forked from Mirrors/wine-wine
services: Don't double release process in service_start.
Fixes a crash while running ntoskrnl tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 496380709d
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
parent
c277654c3b
commit
beeadfb055
|
@ -1066,10 +1066,13 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *
|
|||
if (err != ERROR_SUCCESS)
|
||||
{
|
||||
service_lock(service);
|
||||
service->status.dwCurrentState = SERVICE_STOPPED;
|
||||
service->process = NULL;
|
||||
if (!--process->use_count) process_terminate(process);
|
||||
release_process(process);
|
||||
if (service->process)
|
||||
{
|
||||
service->status.dwCurrentState = SERVICE_STOPPED;
|
||||
service->process = NULL;
|
||||
if (!--process->use_count) process_terminate(process);
|
||||
release_process(process);
|
||||
}
|
||||
service_unlock(service);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue