diff options
author | Jan Schmidt <jan@centricular.com> | 2016-02-24 00:10:52 +1100 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-02-24 02:12:08 +1100 |
commit | b96e4e16a74ff51dfa58994173c45c1906c92b77 (patch) | |
tree | 63ca8da482940f702b381fa2183729276a359de0 | |
parent | a6367c59711cbf8811e0f4e170ca1c2ee8abf974 (diff) |
rtspsink: Fix some leaks in rtspclientsink and the unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=762525
-rw-r--r-- | gst/rtsp-sink/gstrtspclientsink.c | 3 | ||||
-rw-r--r-- | tests/check/gst/rtspclientsink.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gst/rtsp-sink/gstrtspclientsink.c b/gst/rtsp-sink/gstrtspclientsink.c index e7706a4..aeb8342 100644 --- a/gst/rtsp-sink/gstrtspclientsink.c +++ b/gst/rtsp-sink/gstrtspclientsink.c @@ -1047,6 +1047,8 @@ gst_rtsp_client_sink_sinkpad_event (GstPad * pad, GstObject * parent, gst_event_unref (event); return FALSE; } + } else { + gst_object_unref (target); } } @@ -1071,6 +1073,7 @@ gst_rtsp_client_sink_sinkpad_query (GstPad * pad, GstObject * parent, return TRUE; } + gst_object_unref (target); } return gst_pad_query_default (pad, parent, query); diff --git a/tests/check/gst/rtspclientsink.c b/tests/check/gst/rtspclientsink.c index dd7f90f..83c40e9 100644 --- a/tests/check/gst/rtspclientsink.c +++ b/tests/check/gst/rtspclientsink.c @@ -163,13 +163,17 @@ GST_START_TEST (test_record) /* Create an rtspclientsink and send some data */ { gchar *uri = get_server_uri (test_port, TEST_MOUNT_POINT); - gchar *pipe_str = g_strdup_printf (AUDIO_PIPELINE, - RECORD_N_BUFS, uri); + gchar *pipe_str; GstMessage *msg; GstElement *pipeline; GstBus *bus; + pipe_str = g_strdup_printf (AUDIO_PIPELINE, RECORD_N_BUFS, uri); + g_free (uri); + pipeline = gst_parse_launch (pipe_str, NULL); + g_free (pipe_str); + fail_unless (pipeline != NULL); bus = gst_element_get_bus (pipeline); |