hjfs: fix erealloc(..., 0) crash when removing member from group array makes it empty (thanks 9dan)

This commit is contained in:
cinap_lenrek 2015-04-23 18:19:48 +02:00
parent c1ff805e23
commit 4e7efadf12

View file

@ -31,7 +31,7 @@ void*
erealloc(void *v, int c)
{
v = realloc(v, c);
if(v == 0)
if(v == 0 && c != 0)
sysfatal("realloc: %r");
setrealloctag(v, getcallerpc(&c));
return v;