mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
sys: FspVolumeMountNoLock: dereference FsvrtDeviceObject on success
resolves a VPB/FsvrtDeviceObject leak
This commit is contained in:
parent
3e3aa7651f
commit
83c1489b92
@ -473,6 +473,13 @@ static NTSTATUS FspVolumeMountNoLock(
|
||||
Vpb->SerialNumber = FsvolDeviceExtension->VolumeParams.VolumeSerialNumber;
|
||||
IoReleaseVpbSpinLock(Irql);
|
||||
|
||||
/*
|
||||
* Argh! Turns out that the IrpSp->Parameters.MountVolume.DeviceObject is
|
||||
* passed to us with an extra reference, which is not removed on SUCCESS.
|
||||
* So go ahead and dereference it now!
|
||||
*/
|
||||
ObDereferenceObject(FsvrtDeviceObject);
|
||||
|
||||
Irp->IoStatus.Information = 0;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user