mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
EnumDependentServicesA/W and EnumServicesStatusA/W don't fix up pointers if the service manager returns an error.
This fixes bug #3737. Patch by Michael Martin aka bugboy <martinmnet@hotmail.com>. svn path=/trunk/; revision=36383
This commit is contained in:
parent
39a0bb1742
commit
2cbfa7cb91
1 changed files with 28 additions and 28 deletions
|
@ -801,6 +801,13 @@ EnumDependentServicesA(SC_HANDLE hService,
|
|||
}
|
||||
_SEH_END;
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumDependentServicesA() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lpStatusPtr = (LPENUM_SERVICE_STATUSA)lpServices;
|
||||
for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
|
||||
{
|
||||
|
@ -815,13 +822,6 @@ EnumDependentServicesA(SC_HANDLE hService,
|
|||
lpStatusPtr++;
|
||||
}
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumDependentServicesA() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TRACE("EnumDependentServicesA() done\n");
|
||||
|
||||
return TRUE;
|
||||
|
@ -865,6 +865,13 @@ EnumDependentServicesW(SC_HANDLE hService,
|
|||
}
|
||||
_SEH_END;
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumDependentServicesW() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices;
|
||||
for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
|
||||
{
|
||||
|
@ -879,13 +886,6 @@ EnumDependentServicesW(SC_HANDLE hService,
|
|||
lpStatusPtr++;
|
||||
}
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumDependentServicesW() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TRACE("EnumDependentServicesW() done\n");
|
||||
|
||||
return TRUE;
|
||||
|
@ -957,6 +957,13 @@ EnumServicesStatusA(SC_HANDLE hSCManager,
|
|||
}
|
||||
_SEH_END;
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumServicesStatusA() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lpStatusPtr = (LPENUM_SERVICE_STATUSA)lpServices;
|
||||
for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
|
||||
{
|
||||
|
@ -971,13 +978,6 @@ EnumServicesStatusA(SC_HANDLE hSCManager,
|
|||
lpStatusPtr++;
|
||||
}
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumServicesStatusA() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TRACE("EnumServicesStatusA() done\n");
|
||||
|
||||
return TRUE;
|
||||
|
@ -1025,6 +1025,13 @@ EnumServicesStatusW(SC_HANDLE hSCManager,
|
|||
}
|
||||
_SEH_END;
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumServicesStatusW() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lpStatusPtr = (LPENUM_SERVICE_STATUSW)lpServices;
|
||||
for (dwCount = 0; dwCount < *lpServicesReturned; dwCount++)
|
||||
{
|
||||
|
@ -1039,13 +1046,6 @@ EnumServicesStatusW(SC_HANDLE hSCManager,
|
|||
lpStatusPtr++;
|
||||
}
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("REnumServicesStatusW() failed (Error %lu)\n", dwError);
|
||||
SetLastError(dwError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TRACE("EnumServicesStatusW() done\n");
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue