pipewire: allow NULL pointers in pw_properties_free()

Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.

Patch generated with concinelle with a few manual fixes.
This commit is contained in:
Peter Hutterer 2021-06-01 11:21:17 +10:00 committed by Wim Taymans
parent a1e821c259
commit e0471c6757
68 changed files with 142 additions and 273 deletions

View file

@ -646,10 +646,8 @@ static void impl_destroy(struct impl *impl)
if (impl->core && impl->do_disconnect)
pw_core_disconnect(impl->core);
if (impl->stream_props)
pw_properties_free(impl->stream_props);
if (impl->props)
pw_properties_free(impl->props);
pw_properties_free(impl->stream_props);
pw_properties_free(impl->props);
pw_work_queue_cancel(impl->work, impl, SPA_ID_INVALID);
free(impl->buffer);