diff --git a/wintun.c b/wintun.c index 12ef467..9e10e13 100644 --- a/wintun.c +++ b/wintun.c @@ -816,7 +816,10 @@ static NTSTATUS TunInitializeDispatchSecurityDescriptor(VOID) return STATUS_INSUFFICIENT_RESOURCES; Status = RtlAbsoluteToSelfRelativeSD(&SecurityDescriptor, TunDispatchSecurityDescriptor, &RequiredBytes); if (!NT_SUCCESS(Status)) + { + ExFreePoolWithTag(TunDispatchSecurityDescriptor, TUN_MEMORY_TAG); return Status; + } return STATUS_SUCCESS; }