mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Fix a total unimportant file descriptor leak in lemon. This is to silence
warning messages. FossilOrigin-Name: e95cf2c576dda656c0f31eeec3d98e911b9003a1
This commit is contained in:
@ -2522,6 +2522,7 @@ void Parse(struct lemon *gp)
|
||||
ErrorMsg(ps.filename,0,"Can't allocate %d of memory to hold this file.",
|
||||
filesize+1);
|
||||
gp->errorcnt++;
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
if( fread(filebuf,1,filesize,fp)!=filesize ){
|
||||
@ -2529,6 +2530,7 @@ void Parse(struct lemon *gp)
|
||||
filesize);
|
||||
free(filebuf);
|
||||
gp->errorcnt++;
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
fclose(fp);
|
||||
|
Reference in New Issue
Block a user