mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue