pulse-server: message: store pointer to impl directly

Store a pointer to the owner `impl` object instead of
the (embedded) `stat` object. This way `message_free()`
can be simplified since the owner `impl` does not need
to be passed explicitly.
This commit is contained in:
Barnabás Pőcze 2022-06-16 19:54:13 +02:00 committed by Wim Taymans
parent b843b0ab29
commit 080a97c0bb
5 changed files with 27 additions and 30 deletions

View file

@ -4315,7 +4315,7 @@ error_invalid:
goto error;
error:
if (reply)
message_free(impl, reply, false, false);
message_free(reply, false, false);
return res;
}
@ -4391,7 +4391,7 @@ static int do_get_sample_info(struct client *client, uint32_t command, uint32_t
error:
if (reply)
message_free(impl, reply, false, false);
message_free(reply, false, false);
return res;
}
@ -5355,7 +5355,7 @@ static void impl_clear(struct impl *impl)
client_free(c);
spa_list_consume(msg, &impl->free_messages, link)
message_free(impl, msg, true, true);
message_free(msg, true, true);
pw_map_for_each(&impl->samples, impl_free_sample, impl);
pw_map_clear(&impl->samples);