From b076ae5dd7f69044fdd51fa859a4f22c93fc5c24 Mon Sep 17 00:00:00 2001 From: Botond Baranyi <botond.baranyi@ericsson.com> Date: Mon, 25 Jul 2016 15:54:11 +0200 Subject: [PATCH] removed memory leaks from generated debugger code Change-Id: I1bdd8ef398b03bd92f89447c98a2a1fc94de9a3a Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com> --- compiler2/asn1/AST_asn1.cc | 2 ++ compiler2/ttcn3/AST_ttcn3.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/compiler2/asn1/AST_asn1.cc b/compiler2/asn1/AST_asn1.cc index 4503ef0dc..f2086da71 100644 --- a/compiler2/asn1/AST_asn1.cc +++ b/compiler2/asn1/AST_asn1.cc @@ -647,6 +647,8 @@ namespace Asn { " return TRUE;\n" "}\n", get_modid().get_ttcnname().c_str(), print_str, get_modid().get_ttcnname().c_str(), overwrite_str); + Free(print_str); + Free(overwrite_str); } } diff --git a/compiler2/ttcn3/AST_ttcn3.cc b/compiler2/ttcn3/AST_ttcn3.cc index b2168d441..45562f57b 100644 --- a/compiler2/ttcn3/AST_ttcn3.cc +++ b/compiler2/ttcn3/AST_ttcn3.cc @@ -2970,6 +2970,7 @@ namespace Ttcn { " }\n" " return TTCN_Logger::end_event_log2str();\n" "}\n", get_modid().get_ttcnname().c_str(), print_str); + Free(print_str); } if (overwrite_str != NULL) { // don't generate an empty overwriting function @@ -2986,6 +2987,7 @@ namespace Ttcn { " }\n" " return TRUE;\n" "}\n", get_modid().get_ttcnname().c_str(), overwrite_str); + Free(overwrite_str); } } -- GitLab