summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2015-10-10 10:51:10 +0100
committerThibault Saunier <tsaunier@gnome.org>2015-10-10 10:51:10 +0100
commit9005428910546de2e1ad61e55a5fad7fdd514c44 (patch)
treef4d919e18d7d805ee7486f6329d127e1be6ebd5d
parent5067cee05bb1ae69e2a3bebf0afc11db598d3bc9 (diff)
validate: fix double free
Summary: Move variable declarations in the for block so we won't try re-free tldir in case of early short circuiting of the 'for' code. Depends on D348 Reviewers: thiblahute Reviewed By: thiblahute Differential Revision: https://phabricator.freedesktop.org/D349
-rw-r--r--validate/gst/validate/gst-validate-scenario.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c
index e620649..8886ce1 100644
--- a/validate/gst/validate/gst-validate-scenario.c
+++ b/validate/gst/validate/gst-validate-scenario.c
@@ -2303,7 +2303,6 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
{
gchar **scenarios = NULL;
guint i;
- gchar *lfilename = NULL, *tldir = NULL;
gboolean found_actions = FALSE, is_config, ret = TRUE;
const gchar *scenarios_path = g_getenv ("GST_VALIDATE_SCENARIOS_PATH");
@@ -2316,6 +2315,7 @@ gst_validate_scenario_load (GstValidateScenario * scenario,
scenarios = g_strsplit (scenario_name, ":", -1);
for (i = 0; scenarios[i]; i++) {
+ gchar *lfilename = NULL, *tldir = NULL;
/* First check if the scenario name is not a full path to the
* actual scenario */