rtpbin: do not leak encsink pad in error case

https://bugzilla.gnome.org/show_bug.cgi?id=736807
This commit is contained in:
Ognyan Tonchev 2014-09-17 16:37:11 +02:00 committed by Sebastian Dröge
parent 3bf81ad12c
commit f7ae4288a2

View file

@ -3663,16 +3663,16 @@ create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
GstPadLinkReturn ret;
GST_DEBUG_OBJECT (rtpbin, "linking RTCP encoder");
ename = g_strdup_printf ("rtcp_sink_%d", sessid);
encsink = gst_element_get_static_pad (encoder, ename);
g_free (ename);
ename = g_strdup_printf ("rtcp_src_%d", sessid);
encsrc = gst_element_get_static_pad (encoder, ename);
g_free (ename);
if (encsrc == NULL)
goto enc_src_failed;
ename = g_strdup_printf ("rtcp_sink_%d", sessid);
encsink = gst_element_get_static_pad (encoder, ename);
g_free (ename);
if (encsink == NULL)
goto enc_sink_failed;