kernelbase: Return on failed allocation (Coverity).
Signed-off-by: André Hentschel <nerv@dawncrow.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
943d91c8b5
commit
cd2d809822
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue