[0.11] gstreamer: basesrc: prevent unlikely caps leak

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Fri Jan 13 05:29:45 PST 2012


Module: gstreamer
Branch: 0.11
Commit: 247842eaa9d92aae15868afdf79ff89cbbead3a8
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=247842eaa9d92aae15868afdf79ff89cbbead3a8

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Fri Jan 13 14:20:33 2012 +0100

basesrc: prevent unlikely caps leak

---

 libs/gst/base/gstbasesrc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c
index e53f4cf..a0775d1 100644
--- a/libs/gst/base/gstbasesrc.c
+++ b/libs/gst/base/gstbasesrc.c
@@ -2857,6 +2857,8 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc)
     }
     gst_caps_unref (caps);
   } else {
+    if (caps)
+      gst_caps_unref (caps);
     GST_DEBUG_OBJECT (basesrc, "no common caps");
   }
   return result;



More information about the gstreamer-commits mailing list