mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[UDFS] Fix accessing an already freed pointer in UDFMarkAllocatedAsNotXXX()
CORE-11182
This commit is contained in:
parent
4805f0cd73
commit
b64865fbdf
1 changed files with 6 additions and 3 deletions
|
@ -2158,6 +2158,7 @@ UDFMarkAllocatedAsNotXXX(
|
|||
Extent[i].extLocation = 0;
|
||||
Extent[i].extLength = (Extent[i].extLength & UDF_EXTENT_LENGTH_MASK) | flags;
|
||||
NewExtent = Extent;
|
||||
Extent = NULL;
|
||||
AdPrint(("Alloc->Not (1) NewExtent = Extent = %x\n", NewExtent));
|
||||
} else
|
||||
if(l < BOffs) {
|
||||
|
@ -2211,15 +2212,17 @@ UDFMarkAllocatedAsNotXXX(
|
|||
if(Deallocate)
|
||||
UDFMarkSpaceAsXXX(Vcb, (-1), TmpExtInf.Mapping, AS_DISCARDED); // mark as free
|
||||
|
||||
ExtInfo->Modified = TRUE;
|
||||
ExtInfo->Mapping = NewExtent;
|
||||
|
||||
AdPrint(("Alloc->Not: ExtInfo %x, Extent %x\n", ExtInfo, ExtInfo->Mapping));
|
||||
|
||||
if(Extent) {
|
||||
AdPrint(("Alloc->Not kill %x\n", Extent));
|
||||
MyFreePool__(Extent);
|
||||
} else {
|
||||
AdPrint(("Alloc->Not keep %x\n", Extent));
|
||||
}
|
||||
ExtInfo->Modified = TRUE;
|
||||
ExtInfo->Mapping = NewExtent;
|
||||
AdPrint(("Alloc->Not: ExtInfo %x, Extent %x\n", ExtInfo, ExtInfo->Mapping));
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
} // end UDFMarkAllocatedAsNotXXX()
|
||||
|
|
Loading…
Reference in a new issue