[PATCH] advapi32: succeed for null pointer in ChangeServiceConfig2

Nikolay Sivov bunglehead at gmail.com
Thu Mar 19 07:33:15 CDT 2015


On 19.03.2015 15:06, Bernhard Übelacker wrote:
> @@ -2217,7 +2217,13 @@ BOOL WINAPI ChangeServiceConfig2W( SC_HANDLE hService, DWORD dwInfoLevel,
>
>           info.dwInfoLevel = dwInfoLevel;
>           info.u.descr = lpInfo;
> -        err = svcctl_ChangeServiceConfig2W( hService, info );
> +
> +        if (info.u.descr->lpDescription)
> +        {
> +            err = svcctl_ChangeServiceConfig2W( hService, info );
> +        } else {
> +            err = ERROR_SUCCESS;
> +        }

In this case it's better to return earlier, no need to step into 
try..expect block if you know you won't call anything.



More information about the wine-devel mailing list