Account for device removal before initialization
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
248d4268df
commit
1d96af3b98
2
wintun.c
2
wintun.c
@ -1069,6 +1069,8 @@ TunDispatchPnP(DEVICE_OBJECT *DeviceObject, IRP *Irp)
|
|||||||
{
|
{
|
||||||
#pragma warning(suppress : 28175)
|
#pragma warning(suppress : 28175)
|
||||||
TUN_CTX *ctx = DeviceObject->Reserved;
|
TUN_CTX *ctx = DeviceObject->Reserved;
|
||||||
|
if (!ctx)
|
||||||
|
return NdisDispatchPnP(DeviceObject, Irp);
|
||||||
|
|
||||||
switch (stack->MinorFunction)
|
switch (stack->MinorFunction)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user