Fixed test_alloc failure caused by aborting close

Revealed by more correct error reporting in lfsr_file_sync, we need to
not just return errors in lfsr_file_close before we release the file
resources/remove from opened linked-list.
This commit is contained in:
Christopher Haster
2024-01-11 02:31:35 -06:00
parent a781267420
commit 2df21e1f21
-3
View File
@@ -9150,9 +9150,6 @@ int lfsr_file_close(lfs_t *lfs, lfsr_file_t *file) {
if (!lfsr_o_isrdonly(file->flags)
&& !lfsr_o_isdesync(file->flags)) {
err = lfsr_file_sync(lfs, file);
if (err) {
return err;
}
}
// remove from tracked mdirs