stream: Fix leaked joined_bin
authorXavier Claessens <xavier.claessens@collabora.com>
Wed, 7 Sep 2016 14:12:18 +0000 (10:12 -0400)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 7 Sep 2016 15:40:57 +0000 (18:40 +0300)
There is no need to keep a strong ref on it, and _leave_bin() was
setting it to NULL before calling g_clear_object() so it was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=766612

common
gst/rtsp-server/rtsp-stream.c

diff --git a/common b/common
index f49c55e..6f2d209 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit f49c55ecd35a7436194d28297f6d6f20eb6a66fa
+Subproject commit 6f2d2093e84cc0eb99b634fa281822ebb9507285
index c57d13d..61ffa3e 100644 (file)
@@ -2768,7 +2768,7 @@ gst_rtsp_stream_join_bin (GstRTSPStream * stream, GstBin * bin,
         (GCallback) caps_notify, stream);
   }
 
-  priv->joined_bin = gst_object_ref (bin);
+  priv->joined_bin = bin;
   g_mutex_unlock (&priv->lock);
 
   return TRUE;
@@ -2920,7 +2920,6 @@ gst_rtsp_stream_leave_bin (GstRTSPStream * stream, GstBin * bin,
     gst_rtsp_address_free (priv->server_addr_v6);
   priv->server_addr_v6 = NULL;
 
-  g_clear_object (&priv->joined_bin);
   g_mutex_unlock (&priv->lock);
 
   return TRUE;