From 2bd0e7104f46afc473db0c55822e031b4f974e0b Mon Sep 17 00:00:00 2001
From: BenceJanosSzabo <bence.janos.szabo@ericsson.com>
Date: Wed, 22 Mar 2017 10:27:33 +0100
Subject: [PATCH] Memory leak fix

Change-Id: I8797333aba2fc648db70be88769138ec8e06f661
Signed-off-by: BenceJanosSzabo <bence.janos.szabo@ericsson.com>
---
 compiler2/ttcn3/TtcnTemplate.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler2/ttcn3/TtcnTemplate.cc b/compiler2/ttcn3/TtcnTemplate.cc
index d30c86dfd..e9d02f7b6 100644
--- a/compiler2/ttcn3/TtcnTemplate.cc
+++ b/compiler2/ttcn3/TtcnTemplate.cc
@@ -4098,7 +4098,7 @@ compile_time:
           str = t->generate_code_init(str, embedded_name);
           Free(embedded_name);
         }
-        Free(fieldname_str);
+        Free(const_cast<char*>(fieldname_str));
       }
     } else {
       str = mputprintf(str, "%s = NULL_VALUE;\n", name);
-- 
GitLab