projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
216a2ca
)
[NTFS] Fix a memory leak on error
author
Pierre Schweitzer
<pierre@reactos.org>
Sun, 31 Dec 2017 13:18:02 +0000
(14:18 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sun, 31 Dec 2017 13:18:02 +0000
(14:18 +0100)
CID
1427053
drivers/filesystems/ntfs/mft.c
patch
|
blob
|
history
diff --git
a/drivers/filesystems/ntfs/mft.c
b/drivers/filesystems/ntfs/mft.c
index
4724e8d
..
515abf7
100644
(file)
--- 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;
}