summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-22 14:24:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-22 14:33:30 +0200
commit0a181c9aa28f1e1315e31623c1f04e774d300ec3 (patch)
treef06c1256e325383b381f57847e5dbb627d5677f0 /soltools
parent916d3a8e1e35c042c69d13f650b57ed25a13063d (diff)
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
Diffstat (limited to 'soltools')
-rw-r--r--soltools/cpp/_macro.c1
-rw-r--r--soltools/cpp/_unix.c1
2 files changed, 2 insertions, 0 deletions
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;