summaryrefslogtreecommitdiffstats
path: root/gst/rtpmux
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 16:03:19 -0400
committerDave Robillard <dave@drobilla.net>2009-05-03 12:03:18 -0400
commitf69088151bf2f42af1a36d1c173d6bb9af40d515 (patch)
tree13420a36381bbbba74605fd2ca7092f01e2e826e /gst/rtpmux
parent90993179d2342a2d3bb47d44e0cd9fb9db6628d4 (diff)
downloadgst-plugins-bad-f69088151bf2f42af1a36d1c173d6bb9af40d515.tar.gz
gst-plugins-bad-f69088151bf2f42af1a36d1c173d6bb9af40d515.tar.bz2
gst-plugins-bad-f69088151bf2f42af1a36d1c173d6bb9af40d515.zip
rtpmux: Fix leak
Fixed a leak discovered by Laurent Glayal <spegle@yahoo.fr>
Diffstat (limited to 'gst/rtpmux')
-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);
}