winedevice: Fix memory leak (found by Smatch).

This commit is contained in:
Lionel Debroux 2007-12-14 14:57:17 +01:00 committed by Alexandre Julliard
parent b9860a9b27
commit 6ac689368a
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ static BOOL load_driver(void)
if (RegOpenKeyW( HKEY_LOCAL_MACHINE, str + 18 /* skip \registry\machine */, &driver_hkey ))
{
WINE_ERR( "cannot open key %s, err=%u\n", wine_dbgstr_w(str), GetLastError() );
HeapFree( GetProcessHeap(), 0, str);
return FALSE;
}
RtlInitUnicodeString( &keypath, str );