mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[NTFS]
Fix memory leaks svn path=/trunk/; revision=67764
This commit is contained in:
parent
8c1bb8bed1
commit
279c4411fa
1 changed files with 12 additions and 0 deletions
|
@ -101,6 +101,10 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
|||
if (FileRecord == NULL)
|
||||
{
|
||||
DPRINT1("Not enough memory!\n");
|
||||
if (AllocatedBuffer)
|
||||
{
|
||||
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||
}
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -109,6 +113,10 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
|||
{
|
||||
DPRINT1("Can't find record!\n");
|
||||
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
||||
if (AllocatedBuffer)
|
||||
{
|
||||
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -117,6 +125,10 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
|||
{
|
||||
DPRINT1("No data associated with file!\n");
|
||||
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
||||
if (AllocatedBuffer)
|
||||
{
|
||||
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue