https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7a88e3bfd40f9f507c95a…
commit 7a88e3bfd40f9f507c95aec545b6ea491dfcccde
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Dec 31 10:27:31 2017 +0100
[NTFS] Don't leak memory in case of failure while creating a directory
CID 1427065
---
drivers/filesystems/ntfs/create.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/filesystems/ntfs/create.c b/drivers/filesystems/ntfs/create.c
index b591b79073..f37a9518cd 100644
--- a/drivers/filesystems/ntfs/create.c
+++ b/drivers/filesystems/ntfs/create.c
@@ -772,6 +772,7 @@ NtfsCreateDirectory(PDEVICE_EXTENSION DeviceExt,
if (!NT_SUCCESS(Status))
{
DPRINT1("ERROR: Failed to add index root to new file record!\n");
+ ExFreePoolWithTag(NewIndexRoot, TAG_NTFS);
ExFreePoolWithTag(FileRecord, TAG_NTFS);
return Status;
}