mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[NTMARTA]
- In AccpOpenNamedObject, immediately save the last error in case of OpenService failure instead of calling another function in between. CORE-9990 #resolve svn path=/trunk/; revision=68636
This commit is contained in:
@@ -1068,7 +1068,9 @@ ParseRegErr:
|
||||
(DWORD)DesiredAccess);
|
||||
if (*Handle2 == NULL)
|
||||
{
|
||||
goto FailOpenService;
|
||||
Ret = GetLastError();
|
||||
ASSERT(Ret != ERROR_SUCCESS);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
DesiredAccess &= ~SC_MANAGER_CONNECT;
|
||||
@@ -1077,13 +1079,11 @@ ParseRegErr:
|
||||
(DWORD)DesiredAccess);
|
||||
if (*Handle == NULL)
|
||||
{
|
||||
if (*Handle2 != NULL)
|
||||
{
|
||||
CloseServiceHandle((SC_HANDLE)(*Handle2));
|
||||
}
|
||||
|
||||
FailOpenService:
|
||||
Ret = GetLastError();
|
||||
ASSERT(Ret != ERROR_SUCCESS);
|
||||
ASSERT(*Handle2 != NULL);
|
||||
CloseServiceHandle((SC_HANDLE)(*Handle2));
|
||||
|
||||
goto Cleanup;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user