Commit 49638070 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

services: Don't double release process in service_start.

Fixes a crash while running ntoskrnl tests. Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 294cfaf0
...@@ -1069,10 +1069,13 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR * ...@@ -1069,10 +1069,13 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *
if (err != ERROR_SUCCESS) if (err != ERROR_SUCCESS)
{ {
service_lock(service); service_lock(service);
service->status.dwCurrentState = SERVICE_STOPPED; if (service->process)
service->process = NULL; {
if (!--process->use_count) process_terminate(process); service->status.dwCurrentState = SERVICE_STOPPED;
release_process(process); service->process = NULL;
if (!--process->use_count) process_terminate(process);
release_process(process);
}
service_unlock(service); service_unlock(service);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment