aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2009-10-29 11:23:04 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2009-10-29 11:23:04 +0000
commitdbc90110edc7b76ed195edffa1f2d7136c6be1a0 (patch)
tree34decad89e24d099c750122a892151e3330dc76b /tools
parent7e95818603f334d2958974d2f6beb4966a38e9e9 (diff)
From Eric Sesterhenn via bug 4175:
Fixed fp leakage in error path. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30757 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rw-r--r--tools/lemon/lemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c
index aefb6db2e2..be824ac985 100644
--- a/tools/lemon/lemon.c
+++ b/tools/lemon/lemon.c
@@ -2575,6 +2575,7 @@ void Parse(struct lemon *gp)
if( filebuf==0 ){
ErrorMsg(ps.filename,0,"Can't allocate %ld of memory to hold this file.",
filesize+1);
+ fclose(fp);
gp->errorcnt++;
return;
}
@@ -2582,6 +2583,7 @@ void Parse(struct lemon *gp)
ErrorMsg(ps.filename,0,"Can't read in all %ld bytes of this file.",
filesize);
free(filebuf);
+ fclose(fp);
gp->errorcnt++;
return;
}