mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[UDFS] Avoid freeing Vcb when it couldn't have been allocated in UDFPnpSurpriseRemove()
CORE-11203
This commit is contained in:
parent
e5e4362b6d
commit
d60acd88cb
1 changed files with 6 additions and 1 deletions
|
@ -588,7 +588,12 @@ Return Value:
|
|||
// Knock as many files down for this volume as we can.
|
||||
Vcb->Vpb->RealDevice->Flags |= DO_VERIFY_VOLUME;
|
||||
Buf = (PPREVENT_MEDIA_REMOVAL_USER_IN)MyAllocatePool__(NonPagedPool, sizeof(PREVENT_MEDIA_REMOVAL_USER_IN));
|
||||
if(!Buf) try_return(RC = STATUS_INSUFFICIENT_RESOURCES);
|
||||
if(!Buf) {
|
||||
VcbAcquired = FALSE;
|
||||
VcbDeleted = FALSE;
|
||||
try_return(RC = STATUS_INSUFFICIENT_RESOURCES);
|
||||
}
|
||||
|
||||
UDFDoDismountSequence(Vcb, Buf, FALSE);
|
||||
Vcb->VCBFlags &= ~UDF_VCB_FLAGS_VOLUME_MOUNTED;
|
||||
Vcb->WriteSecurity = FALSE;
|
||||
|
|
Loading…
Reference in a new issue