driver: fix memory leak on pre-Windows 7
Should NDIS version check fail the DriverEntry() bailed out without releasing the TunDispatchSecurityDescriptor. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
b28a721d9e
commit
71e1ab6940
@ -1457,15 +1457,14 @@ DriverEntry(DRIVER_OBJECT *DriverObject, UNICODE_STRING *RegistryPath)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
if (!NT_SUCCESS(Status = TunInitializeDispatchSecurityDescriptor()))
|
||||
return Status;
|
||||
|
||||
NdisVersion = NdisGetVersion();
|
||||
if (NdisVersion < NDIS_MINIPORT_VERSION_MIN)
|
||||
return NDIS_STATUS_UNSUPPORTED_REVISION;
|
||||
if (NdisVersion > NDIS_MINIPORT_VERSION_MAX)
|
||||
NdisVersion = NDIS_MINIPORT_VERSION_MAX;
|
||||
|
||||
if (!NT_SUCCESS(Status = TunInitializeDispatchSecurityDescriptor()))
|
||||
return Status;
|
||||
ExInitializeResourceLite(&TunDispatchCtxGuard);
|
||||
ExInitializeResourceLite(&TunDispatchDeviceListLock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user