From 1d75bdca92997a564a18315d32703c7147a415dc Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 17 Jan 2014 11:08:32 -0300 Subject: [PATCH] tests: videodecoder: plug a few leaks Remove leaks of caps and events references --- tests/check/libs/videodecoder.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/check/libs/videodecoder.c b/tests/check/libs/videodecoder.c index 7f6bb98ec2..89916b3244 100644 --- a/tests/check/libs/videodecoder.c +++ b/tests/check/libs/videodecoder.c @@ -209,6 +209,9 @@ cleanup_videodecodertest (void) gst_check_teardown_src_pad (dec); gst_check_teardown_sink_pad (dec); gst_check_teardown_element (dec); + + g_list_free_full (events, (GDestroyNotify) gst_event_unref); + events = NULL; } static GstBuffer * @@ -245,7 +248,7 @@ send_startup_events (void) TEST_VIDEO_WIDTH, "height", G_TYPE_INT, TEST_VIDEO_HEIGHT, "framerate", GST_TYPE_FRACTION, TEST_VIDEO_FPS_N, TEST_VIDEO_FPS_D, NULL); fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_caps (caps))); - + gst_caps_unref (caps); } #define NUM_BUFFERS 1000 @@ -412,9 +415,7 @@ GST_START_TEST (videodecoder_playback_with_events) fail_unless (events_iter == NULL); g_list_free_full (buffers, (GDestroyNotify) gst_buffer_unref); - g_list_free_full (events, (GDestroyNotify) gst_event_unref); buffers = NULL; - events = NULL; cleanup_videodecodertest (); }