shithub: gefs

Download patch

ref: cd0d5bf94d91d31b5b9768551010a4453459fdf9
parent: 7d85dc87bcb5ab2cc6c032bf0ae4eef3bdf14c21
author: Ori Bernstein <[email protected]>
date: Sat May 27 20:53:06 EDT 2023

load: clear arena before loading

--- a/load.c
+++ b/load.c
@@ -88,6 +88,7 @@
 		sysfatal("malloc: %r");
 	for(i = 0; i < fs->narena; i++){
 		a = &fs->arenas[i];
+		memset(a, 0, sizeof(Arena));
 		if((loadarena(a, fs->arenabp[i], fs->arenasz)) == -1)
 			sysfatal("loadfs: %r");
 		a->reserve = a->size / 1024;