bzfs: handle erealloc(..., 0)
This commit is contained in:
parent
a645a2f83d
commit
99718a581b
1 changed files with 1 additions and 1 deletions
|
@ -813,7 +813,7 @@ void *
|
|||
erealloc(void *p, ulong n)
|
||||
{
|
||||
p = realloc(p, n);
|
||||
if(!p)
|
||||
if(!p && n)
|
||||
error("out of memory");
|
||||
return p;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue