Author: tfaber
Date: Thu May 19 13:01:04 2016
New Revision: 71355
URL:
http://svn.reactos.org/svn/reactos?rev=71355&view=rev
Log:
[SERVICES]
- On service stop, set Service->lpImage to NULL after calling
ScmDereferenceServiceImage, so the same image is not dereferenced again on service
deletion
- Do not call ScmDereferenceServiceImage in CreateServiceListEntry, as the service should
never have an image there
CORE-11273 #resolve
Modified:
trunk/reactos/base/system/services/database.c
Modified: trunk/reactos/base/system/services/database.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
==============================================================================
--- trunk/reactos/base/system/services/database.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/database.c [iso-8859-1] Thu May 19 13:01:04 2016
@@ -566,8 +566,7 @@
if (lpService != NULL)
{
- if (lpService->lpImage != NULL)
- ScmDereferenceServiceImage(lpService->lpImage);
+ ASSERT(lpService->lpImage == NULL);
}
return dwError;
@@ -1085,6 +1084,7 @@
dwControl == SERVICE_CONTROL_STOP)
{
ScmDereferenceServiceImage(Service->lpImage);
+ Service->lpImage = NULL;
}
LeaveCriticalSection(&ControlServiceCriticalSection);