hjfs: fix erealloc(..., 0) crash when removing member from group array makes it empty (thanks 9dan)
This commit is contained in:
parent
c1ff805e23
commit
4e7efadf12
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue