[NTFS] Fix a memory leak on error

CID 1427053
This commit is contained in:
Pierre Schweitzer
2017-12-31 14:18:02 +01:00
parent 216a2cae73
commit 2d3d74151b

View File

@@ -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;
}