diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-23 18:25:19 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-23 18:25:19 +0200 |
commit | a645a2f83d79abfa78f0d967a35977c3cfef8cef (patch) | |
tree | 422f89f594e99282343c24140bef1b760d8588bf /sys/src/lib9p/mem.c | |
parent | 4e7efadf120c3357a251b6b2268ec6f3dfb1bd22 (diff) |
lib9p: handle erealloc9p(..., 0)
Diffstat (limited to 'sys/src/lib9p/mem.c')
-rw-r--r-- | sys/src/lib9p/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/lib9p/mem.c b/sys/src/lib9p/mem.c index b4414951f..a19a4c9e3 100644 --- a/sys/src/lib9p/mem.c +++ b/sys/src/lib9p/mem.c @@ -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"); } |