Huw Davies : advapi32: Don't call CloseServiceHandle() with an invalid handle.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 16 08:37:19 CDT 2015
Module: wine
Branch: master
Commit: 3e55f1d2cc673d55ee342ff168a335b321501ee0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e55f1d2cc673d55ee342ff168a335b321501ee0
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Jul 16 11:56:05 2015 +0100
advapi32: Don't call CloseServiceHandle() with an invalid handle.
---
dlls/advapi32/security.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index c2ce1e1..b632577 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -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 );
+ CloseServiceHandle( manager );
+ }
return err;
}
More information about the wine-cvs
mailing list