Credit goes to "cppcheck". The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law.
Signed-off-by: Thomas Jarosch <thomas.jaro...@intra2net.com> --- tool/lemon.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tool/lemon.c b/tool/lemon.c index bd2938b..1f8082c 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -2521,12 +2521,14 @@ void Parse(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; } if( fread(filebuf,1,filesize,fp)!=filesize ){ ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.", filesize); + fclose(fp); free(filebuf); gp->errorcnt++; return; -- 1.7.4.4 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users