Commit 809d135d by Brendan Kehoe

* toplev.c (xmalloc): Only give the fatal msg if SIZE is non-zero.

From-SVN: r14261
parent e1c8c76b
...@@ -1827,7 +1827,7 @@ xmalloc (size) ...@@ -1827,7 +1827,7 @@ xmalloc (size)
unsigned size; unsigned size;
{ {
register char *value = (char *) malloc (size); register char *value = (char *) malloc (size);
if (value == 0) if (value == 0 && size != 0)
fatal ("virtual memory exhausted"); fatal ("virtual memory exhausted");
return value; return value;
} }
......
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