Signed-off-by: André Hentschel nerv@dawncrow.de --- 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 f218ffccb5d..f2b0af9f03a 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);