Commit cd2d8098 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

kernelbase: Return on failed allocation (Coverity).

parent 943d91c8
......@@ -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(&reg_mui_cs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment