From 0a181c9aa28f1e1315e31623c1f04e774d300ec3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 22 May 2014 14:24:26 +0200 Subject: Fix some memory leak in soltools/cpp tool ...though many more remain, as the design appears to be let heap grow until exit. Change-Id: I3e5cc95a0896c8add33a767209ab0ff60d6a4b52 --- soltools/cpp/_macro.c | 1 + soltools/cpp/_unix.c | 1 + 2 files changed, 2 insertions(+) diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index bd91141bc0b9..6d48ef6cf05d 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -133,6 +133,7 @@ void tap = normtokenrow(args); dofree(args->bp); + dofree(args); args = tap; } np->ap = args; diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index d1cd20880e1d..fa8abffec510 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -89,6 +89,7 @@ void maketokenrow(3, &tr); gettokens(&tr, 1); doadefine(&tr, c); + dofree(tr.bp); unsetsource(); break; -- cgit