mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pulse-server: client: do not leave dangling pointers behind
This commit is contained in:
parent
f38837d9e2
commit
d2edb1ab16
1 changed files with 6 additions and 2 deletions
|
|
@ -129,11 +129,15 @@ void client_disconnect(struct client *client)
|
||||||
|
|
||||||
pw_map_for_each(&client->streams, client_free_stream, client);
|
pw_map_for_each(&client->streams, client_free_stream, client);
|
||||||
|
|
||||||
if (client->source)
|
if (client->source) {
|
||||||
pw_loop_destroy_source(impl->loop, client->source);
|
pw_loop_destroy_source(impl->loop, client->source);
|
||||||
|
client->source = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (client->manager)
|
if (client->manager) {
|
||||||
pw_manager_destroy(client->manager);
|
pw_manager_destroy(client->manager);
|
||||||
|
client->manager = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void client_free(struct client *client)
|
void client_free(struct client *client)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue