git: 9front

Download patch

ref: 2cd156d0fc87ad3523cb9c34d416d390c7a03c5c
parent: 3fcbd9c5f99121e11e85a3645f2c13db1fad466f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 23 14:40:00 EDT 2015

bzfs: handle erealloc(..., 0)

--- a/sys/src/cmd/bzfs/oramfs.c
+++ b/sys/src/cmd/bzfs/oramfs.c
@@ -813,7 +813,7 @@
 erealloc(void *p, ulong n)
 {
 	p = realloc(p, n);
-	if(!p)
+	if(!p && n)
 		error("out of memory");
 	return p;
 }
--