From 2f7d402f7b4953e918761df400306afd2f4256ba Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 13 Nov 2023 18:37:21 -0300 Subject: [PATCH] validate: utils: Plug some leaks Part-of: --- .../gst-devtools/validate/gst/validate/gst-validate-utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-devtools/validate/gst/validate/gst-validate-utils.c b/subprojects/gst-devtools/validate/gst/validate/gst-validate-utils.c index 5e9dafde26..b91e5dd97d 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-utils.c +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-utils.c @@ -1267,6 +1267,10 @@ gst_validate_replace_variables_in_string (gpointer source, } if (!var_value) { + g_free (varname); + g_free (pvarname); + g_free (string); + g_clear_pointer (&match_info, g_match_info_free); if (!(flags & GST_VALIDATE_STRUCTURE_RESOLVE_VARIABLES_NO_FAILURE)) { gst_validate_error_structure (source, "Trying to use undefined variable `%s`.\n" @@ -1276,6 +1280,7 @@ gst_validate_replace_variables_in_string (gpointer source, varname, gst_structure_to_string (local_vars), (flags & GST_VALIDATE_STRUCTURE_RESOLVE_VARIABLES_LOCAL_ONLY) ? ": unused" : gst_structure_to_string (global_vars)); + } return NULL;