summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager
diff options
context:
space:
mode:
authorOlivier Crête <olivier.crete@collabora.co.uk>2009-08-11 14:47:12 -0400
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-14 13:47:18 +0100
commit7f569ca9c8c51ab4750c20771f37e0beeca3b050 (patch)
tree4f6881209f9c9244333d18a663c252279245188f /gst/rtpmanager
parent8dd9583357639b3731ab53618daa79b430ffbffe (diff)
rtpbin: Fix reference leak
Fixes #591476.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r--gst/rtpmanager/gstrtpbin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index c09b0ab9..ed9fa3ff 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -2331,13 +2331,15 @@ gst_rtp_bin_get_free_pad_name (GstElement * element, GstPadTemplate * templ)
pad_name = g_strdup_printf (templ->name_template, session++);
pad_it = gst_element_iterate_pads (GST_ELEMENT (element));
name_found = TRUE;
- while (gst_iterator_next (pad_it, (gpointer) & pad) == GST_ITERATOR_OK) {
+ while (name_found &&
+ gst_iterator_next (pad_it, (gpointer) & pad) == GST_ITERATOR_OK) {
gchar *name;
name = gst_pad_get_name (pad);
if (strcmp (name, pad_name) == 0)
name_found = FALSE;
g_free (name);
+ gst_object_unref (pad);
}
gst_iterator_free (pad_it);
}