[SPEC2DEF]

Fix resources leak

svn path=/trunk/; revision=53742
This commit is contained in:
Pierre Schweitzer 2011-09-19 07:29:36 +00:00
parent 0d50ae47fc
commit a728acae67

View file

@ -807,7 +807,11 @@ int main(int argc, char *argv[])
/* Allocate memory buffer */
pszSource = malloc(nFileSize + 1);
if (!pszSource) return -4;
if (!pszSource)
{
fclose(file);
return -4;
}
/* Load input file into memory */
nFileSize = fread(pszSource, 1, nFileSize, file);