[NTFS] Don't leak memory in case of failure while creating a directory

CID 1427065
This commit is contained in:
Pierre Schweitzer 2017-12-31 10:27:31 +01:00
parent 9d9cce2838
commit 7a88e3bfd4
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

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