=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: kernelbase: Return on failed allocation (Coverity).
Alexandre Julliard
julliard at winehq.org
Wed Jun 26 16:15:42 CDT 2019
Module: wine
Branch: master
Commit: cd2d80982223a49fdc2931ac39bad4a65e5b286a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cd2d80982223a49fdc2931ac39bad4a65e5b286a
Author: André Hentschel <nerv at dawncrow.de>
Date: Wed Jun 26 19:29:18 2019 +0200
kernelbase: Return on failed allocation (Coverity).
Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernelbase/registry.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c
index f218ffc..f2b0af9 100644
--- a/dlls/kernelbase/registry.c
+++ b/dlls/kernelbase/registry.c
@@ -2680,9 +2680,11 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
return ERROR_FILE_NOT_FOUND;
size = GetFullPathNameW(file_name, 0, NULL, NULL);
- full_name = heap_alloc(size * sizeof(WCHAR));
if (!size)
return GetLastError();
+ full_name = heap_alloc(size * sizeof(WCHAR));
+ if (!full_name)
+ return ERROR_NOT_ENOUGH_MEMORY;
GetFullPathNameW(file_name, size, full_name, NULL);
EnterCriticalSection(®_mui_cs);
More information about the wine-cvs
mailing list