mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-18 07:00:06 -05:00
memory leak fixes
This commit is contained in:
parent
83b4eaca53
commit
267547c884
3 changed files with 10 additions and 0 deletions
|
|
@ -551,6 +551,10 @@ gst_pipewire_device_provider_stop (GstDeviceProvider * provider)
|
||||||
pw_remote_destroy (self->remote);
|
pw_remote_destroy (self->remote);
|
||||||
self->remote = NULL;
|
self->remote = NULL;
|
||||||
}
|
}
|
||||||
|
if (self->core) {
|
||||||
|
pw_core_destroy (self->core);
|
||||||
|
self->core = NULL;
|
||||||
|
}
|
||||||
if (self->main_loop) {
|
if (self->main_loop) {
|
||||||
pw_thread_loop_destroy (self->main_loop);
|
pw_thread_loop_destroy (self->main_loop);
|
||||||
self->main_loop = NULL;
|
self->main_loop = NULL;
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,8 @@ gst_pipewire_src_finalize (GObject * object)
|
||||||
|
|
||||||
clear_queue (pwsrc);
|
clear_queue (pwsrc);
|
||||||
|
|
||||||
|
pw_core_destroy (pwsrc->core);
|
||||||
|
pwsrc->core = NULL;
|
||||||
pw_thread_loop_destroy (pwsrc->main_loop);
|
pw_thread_loop_destroy (pwsrc->main_loop);
|
||||||
pwsrc->main_loop = NULL;
|
pwsrc->main_loop = NULL;
|
||||||
pw_loop_destroy (pwsrc->loop);
|
pw_loop_destroy (pwsrc->loop);
|
||||||
|
|
|
||||||
|
|
@ -274,10 +274,14 @@ int pw_remote_connect_fd(struct pw_remote *remote, int fd)
|
||||||
void pw_remote_disconnect(struct pw_remote *remote)
|
void pw_remote_disconnect(struct pw_remote *remote)
|
||||||
{
|
{
|
||||||
struct pw_proxy *proxy, *t2;
|
struct pw_proxy *proxy, *t2;
|
||||||
|
struct pw_stream *stream, *s2;
|
||||||
|
|
||||||
pw_log_debug("remote %p: disconnect", remote);
|
pw_log_debug("remote %p: disconnect", remote);
|
||||||
remote->conn->disconnect(remote->conn);
|
remote->conn->disconnect(remote->conn);
|
||||||
|
|
||||||
|
spa_list_for_each_safe(stream, s2, &remote->stream_list, link)
|
||||||
|
pw_stream_destroy(stream);
|
||||||
|
|
||||||
spa_list_for_each_safe(proxy, t2, &remote->proxy_list, link)
|
spa_list_for_each_safe(proxy, t2, &remote->proxy_list, link)
|
||||||
pw_proxy_destroy(proxy);
|
pw_proxy_destroy(proxy);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue