mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
tools: fix some leaks
This commit is contained in:
parent
0ee7d8119c
commit
30571d4706
2 changed files with 32 additions and 1 deletions
|
|
@ -540,6 +540,13 @@ static const struct pw_device_events device_events = {
|
|||
.param = event_param
|
||||
};
|
||||
|
||||
static void
|
||||
removed_proxy (void *data)
|
||||
{
|
||||
struct proxy_data *pd = data;
|
||||
pw_proxy_destroy(pd->proxy);
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_proxy (void *data)
|
||||
{
|
||||
|
|
@ -559,6 +566,7 @@ destroy_proxy (void *data)
|
|||
|
||||
static const struct pw_proxy_events proxy_events = {
|
||||
PW_VERSION_PROXY_EVENTS,
|
||||
.removed = removed_proxy,
|
||||
.destroy = destroy_proxy,
|
||||
};
|
||||
|
||||
|
|
@ -764,8 +772,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
pw_main_loop_run(data.loop);
|
||||
|
||||
pw_proxy_destroy((struct pw_proxy*)data.registry);
|
||||
pw_context_destroy(data.context);
|
||||
pw_main_loop_destroy(data.loop);
|
||||
pw_deinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue