mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 09:12:20 +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].extLocation = 0;
|
||||||
Extent[i].extLength = (Extent[i].extLength & UDF_EXTENT_LENGTH_MASK) | flags;
|
Extent[i].extLength = (Extent[i].extLength & UDF_EXTENT_LENGTH_MASK) | flags;
|
||||||
NewExtent = Extent;
|
NewExtent = Extent;
|
||||||
|
Extent = NULL;
|
||||||
AdPrint(("Alloc->Not (1) NewExtent = Extent = %x\n", NewExtent));
|
AdPrint(("Alloc->Not (1) NewExtent = Extent = %x\n", NewExtent));
|
||||||
} else
|
} else
|
||||||
if(l < BOffs) {
|
if(l < BOffs) {
|
||||||
|
@ -2211,15 +2212,17 @@ UDFMarkAllocatedAsNotXXX(
|
||||||
if(Deallocate)
|
if(Deallocate)
|
||||||
UDFMarkSpaceAsXXX(Vcb, (-1), TmpExtInf.Mapping, AS_DISCARDED); // mark as free
|
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) {
|
if(Extent) {
|
||||||
AdPrint(("Alloc->Not kill %x\n", Extent));
|
AdPrint(("Alloc->Not kill %x\n", Extent));
|
||||||
MyFreePool__(Extent);
|
MyFreePool__(Extent);
|
||||||
} else {
|
} else {
|
||||||
AdPrint(("Alloc->Not keep %x\n", Extent));
|
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;
|
return STATUS_SUCCESS;
|
||||||
} // end UDFMarkAllocatedAsNotXXX()
|
} // end UDFMarkAllocatedAsNotXXX()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue