context: free properties on allocation failure

This commit is contained in:
Thomas Weißschuh 2023-02-19 17:08:57 +00:00 committed by Wim Taymans
parent b9d7ecb5b2
commit 2d5e0ef47b

View file

@ -180,6 +180,7 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
impl = calloc(1, sizeof(struct impl) + user_data_size); impl = calloc(1, sizeof(struct impl) + user_data_size);
if (impl == NULL) { if (impl == NULL) {
pw_properties_free(properties);
res = -errno; res = -errno;
goto error_cleanup; goto error_cleanup;
} }