diff options
author | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2009-08-30 16:15:55 +0000 |
---|---|---|
committer | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2009-08-30 16:15:55 +0000 |
commit | be33cfe2c3bcd17a5fdf8dac73312e6fe685510b (patch) | |
tree | 57e1868012272e4d2a98e704d4dc0cc84d18c5b5 /src/lemon.c | |
parent | f7b07ba94351c032aab814d022b1ca5fd9e3cfde (diff) | |
download | lighttpd-be33cfe2c3bcd17a5fdf8dac73312e6fe685510b.tar.gz |
Fix some mem leaks found by cppcheck
* only the one in sys-files.c is "critical" (and only on windows)
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2617 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/lemon.c')
-rw-r--r-- | src/lemon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lemon.c b/src/lemon.c index 5484c301..ac37f907 100644 --- a/src/lemon.c +++ b/src/lemon.c @@ -2322,6 +2322,7 @@ struct lemon *gp; if( filebuf==0 ){ ErrorMsg(ps.filename,0,"Can't allocate %d of memory to hold this file.", filesize+1); + fclose(fp); gp->errorcnt++; return; } @@ -2329,6 +2330,7 @@ struct lemon *gp; ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.", filesize); free(filebuf); + fclose(fp); gp->errorcnt++; return; } |