[0.10] gst-plugins-base: discoverer: fix pad leak

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 12 09:48:35 PST 2012


Module: gst-plugins-base
Branch: 0.10
Commit: 1cb7cf4d14b994a7622309f9a81eb7d76215a18d
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=1cb7cf4d14b994a7622309f9a81eb7d76215a18d

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Wed Jan 11 11:55:36 2012 +0000

discoverer: fix pad leak

---

 gst-libs/gst/pbutils/gstdiscoverer.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c
index bbbcad2..140eb02 100644
--- a/gst-libs/gst/pbutils/gstdiscoverer.c
+++ b/gst-libs/gst/pbutils/gstdiscoverer.c
@@ -821,8 +821,10 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
   gst_structure_id_get (topology, _TOPOLOGY_PAD_QUARK,
       GST_TYPE_PAD, &pad, NULL);
 
-  if (!dc->priv->streams)
+  if (!dc->priv->streams) {
+    gst_object_unref (pad);
     return NULL;
+  }
 
   for (i = 0, tmp = dc->priv->streams; tmp; tmp = tmp->next, i++) {
     ps = (PrivateStream *) tmp->data;



More information about the gstreamer-commits mailing list