lib9p: handle erealloc9p(..., 0)
This commit is contained in:
parent
4e7efadf12
commit
a645a2f83d
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ erealloc9p(void *v, ulong sz)
|
|||
{
|
||||
void *nv;
|
||||
|
||||
if((nv = realloc(v, sz)) == nil) {
|
||||
if((nv = realloc(v, sz)) == nil && sz != 0) {
|
||||
fprint(2, "out of memory allocating %lud\n", sz);
|
||||
exits("mem");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue