[commit: ghc] ghc-7.8: Fix memleak in hp2ps (e6f48ad)
git at git.haskell.org
git at git.haskell.org
Sun Apr 27 14:44:29 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.8
Link : http://ghc.haskell.org/trac/ghc/changeset/e6f48ad41402a5aeed4e0569c323f5b8a567563b/ghc
>---------------------------------------------------------------
commit e6f48ad41402a5aeed4e0569c323f5b8a567563b
Author: Nicolas Trangez <ikke at nicolast.be>
Date: Wed Apr 23 21:14:23 2014 +0200
Fix memleak in hp2ps
Issue discovered by Coverity scan, CID 43167.
Signed-off-by: Austin Seipp <austin at well-typed.com>
(cherry picked from commit f17dcf09a5797bbefe22aef7d4c508d1672484df)
>---------------------------------------------------------------
e6f48ad41402a5aeed4e0569c323f5b8a567563b
utils/hp2ps/HpFile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils/hp2ps/HpFile.c b/utils/hp2ps/HpFile.c
index bdbf201..5ee9cc2 100644
--- a/utils/hp2ps/HpFile.c
+++ b/utils/hp2ps/HpFile.c
@@ -423,6 +423,8 @@ GetString(FILE *infp)
stringbuffer[i] = '\0';
thestring = copystring(stringbuffer);
+ free(stringbuffer);
+
ASSERT(ch == '\"');
ch = getc(infp); /* skip the '\"' that terminates the string */
More information about the ghc-commits
mailing list