Fix memleak in hp2ps
authorNicolas Trangez <ikke@nicolast.be>
Wed, 23 Apr 2014 19:14:23 +0000 (21:14 +0200)
committerAustin Seipp <austin@well-typed.com>
Sun, 27 Apr 2014 13:05:34 +0000 (08:05 -0500)
Issue discovered by Coverity scan, CID 43167.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit f17dcf09a5797bbefe22aef7d4c508d1672484df)

utils/hp2ps/HpFile.c

index bdbf201..5ee9cc2 100644 (file)
@@ -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 */