[PATCH 0/1] MR2155: services: Avoid calling RtlInitUnicodeString on a static constant.
From: Alex Henrie <alexhenrie24(a)gmail.com> --- programs/services/services.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/services/services.c b/programs/services/services.c index 6bda0a4008b..8a3ff754329 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -1074,9 +1074,9 @@ found: CreateEnvironmentBlock(&environment, token, FALSE); if (GetEnvironmentVariableW( L"WINEBOOTSTRAPMODE", val, ARRAY_SIZE(val) )) { - UNICODE_STRING name, value; + UNICODE_STRING name = RTL_CONSTANT_STRING(L"WINEBOOTSTRAPMODE"); + UNICODE_STRING value; - RtlInitUnicodeString( &name, L"WINEBOOTSTRAPMODE" ); RtlInitUnicodeString( &value, val ); RtlSetEnvironmentVariable( (WCHAR **)&environment, &name, &value ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2155
participants (2)
-
Alex Henrie -
Alex Henrie (@alexhenrie)