shithub: riscv

Download patch

ref: 99718a581ba7c2aebf372d57c8acaeb39535befc
parent: a645a2f83d79abfa78f0d967a35977c3cfef8cef
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;
 }