mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pipewire: allow NULL pointers in pw_free_strv()
Just like the real free() we should just ignore a NULL pointer, makes the caller code easier for those instances where properties are optional.
This commit is contained in:
parent
e0471c6757
commit
71e0cfb5fa
5 changed files with 10 additions and 12 deletions
|
|
@ -384,8 +384,7 @@ static int module_combine_sink_unload(struct client *client, struct module *modu
|
|||
pw_manager_destroy(d->manager);
|
||||
if (d->core != NULL)
|
||||
pw_core_disconnect(d->core);
|
||||
if (d->sink_names)
|
||||
pw_free_strv(d->sink_names);
|
||||
pw_free_strv(d->sink_names);
|
||||
free(d->sink_name);
|
||||
|
||||
return 0;
|
||||
|
|
@ -462,8 +461,7 @@ struct module *create_module_combine_sink(struct impl *impl, const char *argumen
|
|||
return module;
|
||||
out:
|
||||
pw_properties_free(props);
|
||||
if (sink_names)
|
||||
pw_free_strv(sink_names);
|
||||
pw_free_strv(sink_names);
|
||||
errno = -res;
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue