Fix some leaks in error cases

This commit is contained in:
Wim Taymans 2020-05-20 14:05:42 +02:00
parent 8669fd03a6
commit c2028a1695
9 changed files with 43 additions and 22 deletions

View file

@ -95,6 +95,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
props,
sizeof(struct device_data));
if (device == NULL) {
props = NULL;
res = -errno;
goto error_exit_cleanup;
}
@ -119,5 +120,7 @@ error_arguments:
error_exit_cleanup:
if (argv)
pw_free_strv(argv);
if (props)
pw_properties_free(props);
return res;
}