winemenubuilder: Check for NULL allocation (Coverity).

This commit is contained in:
Marcus Meissner 2009-08-11 10:04:55 +02:00 committed by Alexandre Julliard
parent 6fa9fa15da
commit b123102ae5
1 changed files with 1 additions and 0 deletions

View File

@ -724,6 +724,7 @@ static char* heap_printf(const char *format, ...)
HeapFree(GetProcessHeap(), 0, buffer);
}
va_end(args);
if (!buffer) return NULL;
ret = HeapReAlloc(GetProcessHeap(), 0, buffer, strlen(buffer) + 1 );
if (!ret) ret = buffer;
return ret;