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 09:21:25 +0000 (04:21 -0500)
Issue discovered by Coverity scan, CID 43167.

Signed-off-by: Austin Seipp <austin@well-typed.com>
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 */