lib9p: handle erealloc9p(..., 0)

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

View file

@ -24,7 +24,7 @@ erealloc9p(void *v, ulong sz)
{ {
void *nv; 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); fprint(2, "out of memory allocating %lud\n", sz);
exits("mem"); exits("mem");
} }