modules: handle allocation errors

This commit is contained in:
Wim Taymans 2026-05-01 12:29:54 +02:00
parent a55546c9df
commit 6f6b58785e
5 changed files with 29 additions and 1 deletions

View file

@ -539,6 +539,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
} else {
data->local_ip = strdup(PW_ROC_DEFAULT_IP);
}
if (data->local_ip == NULL) {
res = -errno;
goto out;
}
if ((str = pw_properties_get(props, "local.source.port")) != NULL) {
data->local_source_port = pw_properties_parse_int(str);