mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
advapi/service: Fix possible handle leak.
This commit is contained in:
parent
05fec6c871
commit
13b3b724c6
@ -1262,7 +1262,10 @@ SC_HANDLE WINAPI OpenServiceW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
|
||||
sizeof (struct sc_service) + len*sizeof(WCHAR),
|
||||
sc_handle_destroy_service );
|
||||
if (!hsvc)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return NULL;
|
||||
}
|
||||
strcpyW( hsvc->name, lpServiceName );
|
||||
hsvc->hkey = hKey;
|
||||
hsvc->dwAccess = dwDesiredAccess;
|
||||
|
Loading…
Reference in New Issue
Block a user