fix a caps leak

Original commit message from CVS:
fix a caps leak
This commit is contained in:
Thomas Vander Stichele 2005-07-09 23:47:23 +00:00
parent 51bfa5c30b
commit 84caeeb557
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
fix a caps leak
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/base/gstbasesrc.c: (gst_base_src_class_init),

View file

@ -1364,6 +1364,7 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink)
{
GstCaps *srccaps;
GstCaps *sinkcaps;
gboolean ret;
srccaps = gst_pad_get_caps_unlocked (src);
sinkcaps = gst_pad_get_caps_unlocked (sink);
@ -1380,8 +1381,10 @@ gst_pad_link_check_compatible_unlocked (GstPad * src, GstPad * sink)
GST_CAT_DEBUG (GST_CAT_CAPS,
"intersection caps %p %" GST_PTR_FORMAT, icaps, icaps);
if (!icaps || gst_caps_is_empty (icaps))
if (!icaps || gst_caps_is_empty (icaps)) {
gst_caps_unref (icaps);
return FALSE;
}
}
return TRUE;