You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have no idea if the file is already close,so i may be call lfs_file_close() two times.
and free() call two times too, this cause an error.
shell we just add one line to bypass ??
static int lfs_file_rawclose(lfs_t *lfs, lfs_file_t *file) {
.....
// clean up memory
if (!file->cfg->buffer) {
lfs_free(file->cache.buffer);
file->cache.buffer = NULL; //+++++++???
}
return err;
}
The text was updated successfully, but these errors were encountered:
From my perspective these sort of user-protections are out of scope for now. Though given the related discussion maybe they should be added at some point behind a sort of LFS_USERFRIENDLY define or similar.
i have no idea if the file is already close,so i may be call lfs_file_close() two times.
and free() call two times too, this cause an error.
shell we just add one line to bypass ??
static int lfs_file_rawclose(lfs_t *lfs, lfs_file_t *file) {
.....
// clean up memory
if (!file->cfg->buffer) {
lfs_free(file->cache.buffer);
file->cache.buffer = NULL; //+++++++???
}
}
The text was updated successfully, but these errors were encountered: