diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index f63c85cf351..0bdd0a30db2 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -45,7 +45,7 @@ void *xmalloc (size_t size) void *xrealloc (void *ptr, size_t size) { void *res = realloc (ptr, size); - if (res == NULL) + if (size && res == NULL) { fprintf (stderr, "Virtual memory exhausted.\n"); exit (1);