ref: 385b07b3b8db74f96ed14261fc5a236b6a5c2e58
parent: d6e60977d129809f42a876742b8bc254bc7ee483
author: Ori Bernstein <[email protected]>
date: Tue Feb 20 17:29:33 EST 2024
fs: fix typo in write error we were freeing the wrong block index
--- a/fs.c
+++ b/fs.c
@@ -2054,7 +2054,7 @@
if(waserror()){
if(!fs->rdonly)
for(j = 0; j < i; j++)
- freeblk(t, nil, bp[i]);
+ freeblk(t, nil, bp[j]);
nexterror();
}
n = writeb(f, &kv[i], &bp[i], p, o, c, f->dent->length);