From 308fa194a7af2dc1c8c13589097a0490a8c40556 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 10 Apr 2015 11:28:34 +0200 Subject: [PATCH] validate: report: fix GString leak when early returning --- validate/gst/validate/gst-validate-report.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index c1888df..92797e1 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -676,7 +676,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) GstValidateAction *action = (GstValidateAction *) source; if (_action_check_and_set_printed (action)) - return; + goto out; g_string_printf (string, "Executing "); @@ -764,6 +764,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args) fflush (log_files[i]); } +out: g_string_free (string, TRUE); } -- 2.7.4