mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
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:
parent
68a27d46e4
commit
0b5bb79dc8
|
@ -62,13 +62,13 @@ HvpWriteLog(
|
||||||
/* Write hive block and block bitmap */
|
/* Write hive block and block bitmap */
|
||||||
Success = RegistryHive->FileWrite(RegistryHive, HV_TYPE_LOG,
|
Success = RegistryHive->FileWrite(RegistryHive, HV_TYPE_LOG,
|
||||||
0, Buffer, BufferSize);
|
0, Buffer, BufferSize);
|
||||||
|
RegistryHive->Free(Buffer);
|
||||||
|
|
||||||
if (!Success)
|
if (!Success)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegistryHive->Free(Buffer);
|
|
||||||
|
|
||||||
/* Write dirty blocks */
|
/* Write dirty blocks */
|
||||||
FileOffset = BufferSize;
|
FileOffset = BufferSize;
|
||||||
BlockIndex = 0;
|
BlockIndex = 0;
|
||||||
|
|
Loading…
Reference in a new issue