From 4b10229d09b4802f94261f3f5864bfda0e6f7f89 Mon Sep 17 00:00:00 2001 From: BenceJanosSzabo <bence.janos.szabo@ericsson.com> Date: Tue, 17 Jan 2017 14:41:00 +0100 Subject: [PATCH] Corrected invalid frees in makefilegen Change-Id: I4dc7d3a67b76ffda37339c82d271306d7f64a71f Signed-off-by: BenceJanosSzabo <bence.janos.szabo@ericsson.com> --- compiler2/xpather.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/compiler2/xpather.cc b/compiler2/xpather.cc index aaca6698c..4b3e96340 100644 --- a/compiler2/xpather.cc +++ b/compiler2/xpather.cc @@ -1345,6 +1345,9 @@ extern "C" tpd_result process_tpd(const char *p_tpd_name, const char *actcfg, p_Hflag, generatorCommandOutput, target_placement_list, prefix_workdir, run_command_list, seen_tpd_files, required_configs, profiled_file_list, search_paths, n_search_paths, makefileScript, all_configs); + } else { + free_config_struct(all_configs); + all_configs = NULL; } if (TPD_FAILED == success){ goto failure; @@ -1387,17 +1390,18 @@ failure: free_string_list(*profiled_file_list); Free(search_paths); - - Free(generatorCommandOutput); + Free(*generatorCommandOutput); + free_string2_list(create_symlink_list); free_string2_list(target_placement_list); free_string2_list(required_configs); - Free(makefileScript); - - Free(p_ets_name); - Free(cxxcompiler); - Free(optlevel); - Free(optflags); - Free(ttcn3prep); + Free(*makefileScript); + Free(*p_project_name); + + Free(*p_ets_name); + Free(*cxxcompiler); + Free(*optlevel); + Free(*optflags); + Free(*ttcn3prep); for (int E = 0; E < *p_argc; ++E) Free((*p_argv)[E]); Free(*p_argv); exit(EXIT_FAILURE); -- GitLab