gst: Fix memory leaks in usage of gst_element_get_request_pad() API

The return value has to be unreffed at some point.

https://bugzilla.gnome.org/show_bug.cgi?id=776334
This commit is contained in:
Garima Gaur 2016-12-21 13:41:16 +05:30 committed by Sebastian Dröge
parent 90b14a42b0
commit 0fdd4e2539
2 changed files with 2 additions and 0 deletions

View file

@ -878,6 +878,7 @@ gst_sdp_demux_stream_configure_udp_sink (GstSDPDemux * demux,
if (pad) {
sinkpad = gst_element_get_static_pad (stream->udpsink, "sink");
gst_pad_link (pad, sinkpad);
gst_object_unref (pad);
gst_object_unref (sinkpad);
} else {
/* not very fatal, we just won't be able to send RTCP */

View file

@ -751,6 +751,7 @@ dvb_base_bin_request_new_pad (GstElement * element,
pad_name = gst_pad_get_name (pad);
ghost = gst_ghost_pad_new (pad_name, pad);
gst_object_unref (pad);
g_free (pad_name);
gst_element_add_pad (element, ghost);