rtsp-stream: Always unref return value of gst_object_get_parent()
authorDavid Svensson Fors <davidsf@axis.com>
Thu, 22 Oct 2015 07:15:21 +0000 (09:15 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 23 Oct 2015 13:43:09 +0000 (16:43 +0300)
Fixes a leak of a GstBin in the udp-mcast case.

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

gst/rtsp-server/rtsp-stream.c

index 4417c43..1c4366e 100644 (file)
@@ -2843,7 +2843,6 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
           gst_object_unref (pad);
           gst_object_unref (selpad);
         }
-        gst_object_unref (bin);
 
         priv->transport_sources =
             g_list_prepend (priv->transport_sources, source);
@@ -2879,6 +2878,8 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
         }
       }
 
+      gst_object_unref (bin);
+
       /* fall through for the generic case */
     }
     case GST_RTSP_LOWER_TRANS_UDP: