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>
Thu, 22 Oct 2015 16:28:15 +0000 (19:28 +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 4e5f644..60442ad 100644 (file)
@@ -2881,7 +2881,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);
@@ -2917,6 +2916,8 @@ update_transport (GstRTSPStream * stream, GstRTSPStreamTransport * trans,
         }
       }
 
+      gst_object_unref (bin);
+
       /* fall through for the generic case */
     }
     case GST_RTSP_LOWER_TRANS_UDP: