ntoskrnl.exe: Fix leak of ServiceKeyName if DriverInit fails.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-08-03 18:41:42 +02:00 committed by Alexandre Julliard
parent 79cd0d870d
commit 272ebf862d
1 changed files with 1 additions and 0 deletions

View File

@ -929,6 +929,7 @@ NTSTATUS WINAPI IoCreateDriver( UNICODE_STRING *name, PDRIVER_INITIALIZE init )
if (status)
{
RtlFreeUnicodeString( &driver->driver_obj.DriverName );
RtlFreeUnicodeString( &driver->driver_extension.ServiceKeyName );
RtlFreeHeap( GetProcessHeap(), 0, driver );
}
else