diff options
author | Olivier Crête <olivier.crete@collabora.co.uk> | 2009-08-11 14:47:12 -0400 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-08-14 13:47:18 +0100 |
commit | 7f569ca9c8c51ab4750c20771f37e0beeca3b050 (patch) | |
tree | 4f6881209f9c9244333d18a663c252279245188f /gst/rtpmanager | |
parent | 8dd9583357639b3731ab53618daa79b430ffbffe (diff) |
rtpbin: Fix reference leak
Fixes #591476.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r-- | gst/rtpmanager/gstrtpbin.c | 4 |
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); } |