Vitaliy Margolen : advapi32: Don't allocate memory for empty argument
string and pass
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 3 06:37:25 CST 2006
Module: wine
Branch: refs/heads/master
Commit: e74bda9d958fdf416c0453cf9b363e96aef6a02a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e74bda9d958fdf416c0453cf9b363e96aef6a02a
Author: Vitaliy Margolen <wine-patch at kievinfo.com>
Date: Tue Jan 3 12:05:32 2006 +0100
advapi32: Don't allocate memory for empty argument string and pass
NULL instead.
---
dlls/advapi32/service.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index cc6a36c..60d0f8d 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -359,6 +359,15 @@ static DWORD WINAPI service_thread(LPVOI
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)
{
More information about the wine-cvs
mailing list