advapi32: Don't call CloseServiceHandle() with an invalid handle.
This commit is contained in:
parent
a38d2ee10d
commit
3e55f1d2cc
|
@ -431,8 +431,10 @@ static inline DWORD get_security_service( LPWSTR full_service_name, DWORD access
|
|||
|
||||
err = SERV_OpenSCManagerW( NULL, NULL, access, (SC_HANDLE *)&manager );
|
||||
if (err == ERROR_SUCCESS)
|
||||
{
|
||||
err = SERV_OpenServiceW( manager, full_service_name, access, (SC_HANDLE *)service );
|
||||
CloseServiceHandle( manager );
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue