summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 16:03:19 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 16:03:49 -0400
commit6c4eeff781bfd6ad816eedec9a972eb8725e7e2e (patch)
tree1564b866647b148d1202f1db7d292cb0d687468d /gst
parent905aad3572e9c82dd731718e09ca02b0916e8882 (diff)
downloadgst-plugins-bad-6c4eeff781bfd6ad816eedec9a972eb8725e7e2e.tar.gz
gst-plugins-bad-6c4eeff781bfd6ad816eedec9a972eb8725e7e2e.tar.bz2
gst-plugins-bad-6c4eeff781bfd6ad816eedec9a972eb8725e7e2e.zip
rtpmux: Fix leak
Fixed a leak discovered by Laurent Glayal <spegle@yahoo.fr>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmux/gstrtpmux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c
index e62f8a14..ecef0c7f 100644
--- a/gst/rtpmux/gstrtpmux.c
+++ b/gst/rtpmux/gstrtpmux.c
@@ -431,12 +431,16 @@ same_clock_rate_fold (gpointer item, GValue * ret, gpointer user_data)
const GstCaps *accumcaps;
GstCaps *intersect;
- if (pad == mypad)
+ if (pad == mypad) {
+ gst_object_unref (pad);
return TRUE;
+ }
peercaps = gst_pad_peer_get_caps (pad);
- if (!peercaps)
+ if (!peercaps) {
+ gst_object_unref (pad);
return TRUE;
+ }
othercaps = gst_caps_intersect (peercaps,
gst_pad_get_pad_template_caps (pad));
@@ -451,6 +455,7 @@ same_clock_rate_fold (gpointer item, GValue * ret, gpointer user_data)
g_value_take_boxed (ret, intersect);
gst_caps_unref (othercaps);
+ gst_object_unref (pad);
return !gst_caps_is_empty (intersect);
}