mirror of
https://github.com/reactos/reactos.git
synced 2026-05-26 10:53:56 +08:00
[NTFS] Fix a memory leak on error
CID 1427053
This commit is contained in:
@@ -948,6 +948,7 @@ SetResidentAttributeDataLength(PDEVICE_EXTENSION Vcb,
|
||||
DPRINT1("Unable to create LargeMcb!\n");
|
||||
if (AttribDataSize.QuadPart > 0)
|
||||
ExFreePoolWithTag(AttribData, TAG_NTFS);
|
||||
ExFreePoolWithTag(NewRecord, TAG_NTFS);
|
||||
_SEH2_YIELD(return _SEH2_GetExceptionCode());
|
||||
} _SEH2_END;
|
||||
|
||||
@@ -961,6 +962,7 @@ SetResidentAttributeDataLength(PDEVICE_EXTENSION Vcb,
|
||||
DPRINT1("ERROR: Couldn't update file record to continue migration!\n");
|
||||
if (AttribDataSize.QuadPart > 0)
|
||||
ExFreePoolWithTag(AttribData, TAG_NTFS);
|
||||
ExFreePoolWithTag(NewRecord, TAG_NTFS);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user