From e74bda9d958fdf416c0453cf9b363e96aef6a02a Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Tue, 3 Jan 2006 12:05:32 +0100 Subject: [PATCH] advapi32: Don't allocate memory for empty argument string and pass NULL instead. --- dlls/advapi32/service.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index cc6a36c28d5..60d0f8de827 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -359,6 +359,15 @@ static DWORD WINAPI service_thread(LPVOID arg) len += strlenW(&str[len]) + 1; argc++; } + + if (!argc) + { + if (info->unicode) + info->proc.w(0, NULL); + else + info->proc.a(0, NULL); + return 0; + } if (info->unicode) {