bzfs: handle erealloc(..., 0)

This commit is contained in:
cinap_lenrek 2015-04-23 18:40:00 +02:00
parent a645a2f83d
commit 99718a581b

View file

@ -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;
}