From 9c95bfcc30b9623e9ef9f721364bc8cca702ce90 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Wed, 3 Jan 2018 13:57:58 -0600 Subject: [PATCH] advapi: Fix return value for QueryServiceConfig2W. Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/advapi32/service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 3f2fb93d68a..ddd6a214297 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1607,7 +1607,11 @@ BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwLevel, LPBYTE buffe switch (dwLevel) { case SERVICE_CONFIG_DESCRIPTION: - if (!(bufptr = heap_alloc( size ))) return ERROR_OUTOFMEMORY; + if (!(bufptr = heap_alloc( size ))) + { + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return FALSE; + } break; case SERVICE_CONFIG_PRESHUTDOWN_INFO: