From 9a7dd45e57dfe272e04db055b7dc9f49d8a20c1b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 19 Dec 2017 11:57:52 +0100 Subject: [PATCH] rtspsrc: Fix two leaks * gst_event_new_stream_start() does not take ownership of the stream_id * the pipeline_request_id string that is created was not being freed --- gst/rtsp/gstrtspsrc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 7acb2cd052..7327471337 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2543,6 +2543,7 @@ gst_rtspsrc_handle_src_sink_event (GstPad * pad, GstObject * parent, gst_event_unref (event); event = gst_event_new_stream_start (stream_id); + g_free (stream_id); break; } default: @@ -6764,6 +6765,9 @@ gst_rtspsrc_setup_streams_start (GstRTSPSrc * src, gboolean async) gst_rtsp_ext_list_stream_select (src->extensions, url); + if (pipelined_request_id) + g_free (pipelined_request_id); + /* if there is nothing to activate, error out */ if (!src->need_activate) goto nothing_to_activate; @@ -6840,6 +6844,8 @@ nothing_to_activate: } cleanup_error: { + if (pipelined_request_id) + g_free (pipelined_request_id); gst_rtsp_message_unset (&request); gst_rtsp_message_unset (&response); return res;