gst/gstpad.c: Fix small refount leak in caps compatibility check.
authorAntoine Tremblay <hexa00@gmail.com>
Mon, 6 Oct 2008 08:45:42 +0000 (08:45 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 6 Oct 2008 08:45:42 +0000 (08:45 +0000)
Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Original patch by : Simon Descaries
Fix small refount leak in caps compatibility check.
Fixes #551676.

ChangeLog
common
gst/gstpad.c

index 145fba9..c656f0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-10-06  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       Patch by: Antoine Tremblay <hexa00 at gmail dot com>
+
+       * gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
+       Original patch by : Simon Descaries
+       Fix small refount leak in caps compatibility check.
+       Fixes #551676.
+
 2008-10-06  Stefan Kost  <ensonic@users.sf.net>
 
        * docs/pwg/advanced-request.xml:
diff --git a/common b/common
index 1ff63d8..ea93f2e 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 1ff63d8f92c36bf207434436f4ce75f2a4ea11a4
+Subproject commit ea93f2ed580bcc19322e4c07f677eda980c821eb
index b610ca7..6a52cef 100644 (file)
@@ -1679,8 +1679,13 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink)
 
   /* if we have caps on both pads we can check the intersection. If one
    * of the caps is NULL, we return TRUE. */
-  if (srccaps == NULL || sinkcaps == NULL)
+  if (srccaps == NULL || sinkcaps == NULL) {
+    if (srccaps)
+      gst_caps_unref (srccaps);
+    if (sinkcaps)
+      gst_caps_unref (sinkcaps);
     goto done;
+  }
 
   icaps = gst_caps_intersect (srccaps, sinkcaps);
   gst_caps_unref (srccaps);