From 201b013fac9fd0b14a00b9c2680450e5df82a145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 8 Jun 2015 20:00:47 +0100 Subject: [PATCH] tests: fakesink: fix string leak in unit test --- tests/check/elements/fakesink.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/check/elements/fakesink.c b/tests/check/elements/fakesink.c index 146f397610..b96d266d82 100644 --- a/tests/check/elements/fakesink.c +++ b/tests/check/elements/fakesink.c @@ -1002,7 +1002,7 @@ last_message_cb (GObject * obj, GParamSpec * pspec, gpointer user_data) fail_unless (last_msg != NULL); if (!strstr (last_msg, "chain")) - return; + goto skip; GST_LOG_OBJECT (obj, "%s", last_msg); @@ -1021,6 +1021,8 @@ last_message_cb (GObject * obj, GParamSpec * pspec, gpointer user_data) *p_counter = count + 1; +skip: + g_free (last_msg); } @@ -1094,7 +1096,7 @@ deep_notify_last_message_cb (GstObject * obj, GstObject * prop_obj, fail_unless (last_msg != NULL); if (!strstr (last_msg, "chain")) - return; + goto skip; GST_LOG_OBJECT (prop_obj, "%s", last_msg); @@ -1113,6 +1115,8 @@ deep_notify_last_message_cb (GstObject * obj, GstObject * prop_obj, *p_counter = count + 1; +skip: + g_free (last_msg); }