From: Pierre Schweitzer Date: Sun, 31 Dec 2017 13:18:02 +0000 (+0100) Subject: [NTFS] Fix a memory leak on error X-Git-Tag: 0.4.9-dev~501 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=2d3d74151b77ec6c59414616b88634698317bb87 [NTFS] Fix a memory leak on error CID 1427053 --- diff --git a/drivers/filesystems/ntfs/mft.c b/drivers/filesystems/ntfs/mft.c index 4724e8d899b..515abf7a4fa 100644 --- a/drivers/filesystems/ntfs/mft.c +++ b/drivers/filesystems/ntfs/mft.c @@ -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; }