mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[FFS] Don't leak memory on volume mount
CID 1363583
This commit is contained in:
parent
19bf484a5b
commit
34d74fbd17
1 changed files with 16 additions and 0 deletions
|
@ -183,6 +183,9 @@ FFSLoadDiskLabel(
|
||||||
Vcb->FSOffset[0] = 0;
|
Vcb->FSOffset[0] = 0;
|
||||||
Vcb->PartitionNumber = 0;
|
Vcb->PartitionNumber = 0;
|
||||||
Vcb->ffs_super_block = FFSSb;
|
Vcb->ffs_super_block = FFSSb;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ExFreePoolWithTag(Disklabel, FFS_POOL_TAG);
|
||||||
|
#endif
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -202,12 +205,18 @@ FFSLoadDiskLabel(
|
||||||
Vcb->FSOffset[0] = 0;
|
Vcb->FSOffset[0] = 0;
|
||||||
Vcb->PartitionNumber = 0;
|
Vcb->PartitionNumber = 0;
|
||||||
Vcb->ffs_super_block = FFSSb;
|
Vcb->ffs_super_block = FFSSb;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ExFreePoolWithTag(Disklabel, FFS_POOL_TAG);
|
||||||
|
#endif
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KdPrint(("FFSLoadDiskLabel() No BSD file system was found on the \"normal\" partition.\n"));
|
KdPrint(("FFSLoadDiskLabel() No BSD file system was found on the \"normal\" partition.\n"));
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ExFreePoolWithTag(Disklabel, FFS_POOL_TAG);
|
||||||
|
#endif
|
||||||
Status = STATUS_UNRECOGNIZED_VOLUME;
|
Status = STATUS_UNRECOGNIZED_VOLUME;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -217,6 +226,9 @@ FFSLoadDiskLabel(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
KdPrint(("FFSLoadDiskLabel() Slice info failed, Status %u\n", Status));
|
KdPrint(("FFSLoadDiskLabel() Slice info failed, Status %u\n", Status));
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ExFreePoolWithTag(Disklabel, FFS_POOL_TAG);
|
||||||
|
#endif
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,6 +315,10 @@ FFSLoadDiskLabel(
|
||||||
if (Vcb->ffs_super_block == NULL)
|
if (Vcb->ffs_super_block == NULL)
|
||||||
Status = STATUS_UNRECOGNIZED_VOLUME;
|
Status = STATUS_UNRECOGNIZED_VOLUME;
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
ExFreePoolWithTag(Disklabel, FFS_POOL_TAG);
|
||||||
|
#endif
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue