mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 13:14:41 +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)
|
if (FileRecord == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Not enough memory!\n");
|
DPRINT1("Not enough memory!\n");
|
||||||
|
if (AllocatedBuffer)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||||
|
}
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +113,10 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
||||||
{
|
{
|
||||||
DPRINT1("Can't find record!\n");
|
DPRINT1("Can't find record!\n");
|
||||||
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
||||||
|
if (AllocatedBuffer)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||||
|
}
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,6 +125,10 @@ NtfsReadFile(PDEVICE_EXTENSION DeviceExt,
|
||||||
{
|
{
|
||||||
DPRINT1("No data associated with file!\n");
|
DPRINT1("No data associated with file!\n");
|
||||||
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
ExFreePoolWithTag(FileRecord, TAG_NTFS);
|
||||||
|
if (AllocatedBuffer)
|
||||||
|
{
|
||||||
|
ExFreePoolWithTag(ReadBuffer, TAG_NTFS);
|
||||||
|
}
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue