advapi32: Hold lock while processing service controls.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f4590e91eb
commit
63c36da6da
|
@ -461,6 +461,8 @@ static DWORD WINAPI service_control_dispatcher(LPVOID arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EnterCriticalSection( &service_cs );
|
||||||
|
|
||||||
/* validate service name */
|
/* validate service name */
|
||||||
name = (WCHAR *)data;
|
name = (WCHAR *)data;
|
||||||
if (!info.name_size || data_size < info.name_size * sizeof(WCHAR) || name[info.name_size - 1])
|
if (!info.name_size || data_size < info.name_size * sizeof(WCHAR) || name[info.name_size - 1])
|
||||||
|
@ -504,6 +506,7 @@ static DWORD WINAPI service_control_dispatcher(LPVOID arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
LeaveCriticalSection( &service_cs );
|
||||||
WriteFile( disp->pipe, &result, sizeof(result), &count, NULL );
|
WriteFile( disp->pipe, &result, sizeof(result), &count, NULL );
|
||||||
heap_free( data );
|
heap_free( data );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue