Account for device removal before initialization

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-06-27 11:57:14 +00:00
parent 248d4268df
commit 1d96af3b98

View File

@ -1069,6 +1069,8 @@ TunDispatchPnP(DEVICE_OBJECT *DeviceObject, IRP *Irp)
{
#pragma warning(suppress : 28175)
TUN_CTX *ctx = DeviceObject->Reserved;
if (!ctx)
return NdisDispatchPnP(DeviceObject, Irp);
switch (stack->MinorFunction)
{