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

@ -462,7 +462,10 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
data->remote_ip = strdup(str);
} else {
pw_log_error("Remote IP not specified");
res = -EINVAL;
errno = EINVAL;
}
if (data->remote_ip == NULL) {
res = -errno;
goto out;
}