free memory before returning on failure.

Thanks to Yaron Aharonson (yaron.aharonson@gmail.com) for spotting this.
See issue #2694 for more details.

svn path=/trunk/; revision=29267
This commit is contained in:
Timo Kreuzer 2007-09-28 04:17:13 +00:00
parent 68a27d46e4
commit 0b5bb79dc8

View file

@ -62,13 +62,13 @@ HvpWriteLog(
/* Write hive block and block bitmap */
Success = RegistryHive->FileWrite(RegistryHive, HV_TYPE_LOG,
0, Buffer, BufferSize);
RegistryHive->Free(Buffer);
if (!Success)
{
return FALSE;
}
RegistryHive->Free(Buffer);
/* Write dirty blocks */
FileOffset = BufferSize;
BlockIndex = 0;