[INFLIBNEW] Free allocated memory on error

svn path=/trunk/; revision=47206
This commit is contained in:
Gregor Schneider 2010-05-14 20:56:43 +00:00
parent 12eb6e6cba
commit d28f0be86e

View file

@ -189,6 +189,7 @@ InfHostOpenFile(PHINF InfHandle,
if (FileLength != fread(FileBuffer, (size_t)1, (size_t)FileLength, File))
{
DPRINT1("fread() failed (errno %d)\n", errno);
FREE(FileBuffer);
fclose(File);
return -1;
}