From b1c6dec543d6445151631ea13825820f2ad3914d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 14 Jan 2009 15:37:07 +0000 Subject: [PATCH] ext/pulse/pulseprobe.c: Fix refcount loop, resulting in a thread leak. Fixes bug #567746. Original commit message from CVS: Patch by: Lennart Poettering * ext/pulse/pulseprobe.c: (gst_pulseprobe_new), (gst_pulseprobe_free): Fix refcount loop, resulting in a thread leak. Fixes bug #567746. --- ChangeLog | 8 ++++++++ ext/pulse/pulseprobe.c | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 284c8f2..5437ff9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-01-14 Sebastian Dröge + Patch by: Lennart Poettering + + * ext/pulse/pulseprobe.c: (gst_pulseprobe_new), + (gst_pulseprobe_free): + Fix refcount loop, resulting in a thread leak. Fixes bug #567746. + +2009-01-14 Sebastian Dröge + * gst/spectrum/Makefile.am: * gst/spectrum/README: * gst/spectrum/gstspectrum.c: (gst_spectrum_base_init), diff --git a/ext/pulse/pulseprobe.c b/ext/pulse/pulseprobe.c index a25585b..59a250b 100644 --- a/ext/pulse/pulseprobe.c +++ b/ext/pulse/pulseprobe.c @@ -263,7 +263,7 @@ gst_pulseprobe_new (GObject * object, GObjectClass * klass, guint prop_id, GstPulseProbe *c = NULL; c = g_new (GstPulseProbe, 1); - c->object = g_object_ref (object); + c->object = object; /* We don't inc the ref counter here to avoid a ref loop */ c->server = g_strdup (server); c->enumerate_sinks = sinks; c->enumerate_sources = sources; @@ -293,8 +293,6 @@ gst_pulseprobe_free (GstPulseProbe * c) g_list_foreach (c->devices, (GFunc) g_free, NULL); g_list_free (c->devices); - g_object_unref (c->object); - g_free (c); } -- 2.7.4