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:
Peter Hutterer 2021-06-02 15:19:19 +10:00 committed by Wim Taymans
parent e0471c6757
commit 71e0cfb5fa
5 changed files with 10 additions and 12 deletions

View file

@ -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;