mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'contrib/github_pr_18823_v6.0' into 'release/v6.0'
fix(vfs): use MAX_FDS instead of VFS_MAX_COUNT when clearing fd table on unregister (GitHub PR) (v6.0) See merge request espressif/esp-idf!50698
This commit is contained in:
@@ -593,7 +593,7 @@ esp_err_t esp_vfs_unregister_with_id(esp_vfs_id_t vfs_id)
|
|||||||
|
|
||||||
_lock_acquire(&s_fd_table_lock);
|
_lock_acquire(&s_fd_table_lock);
|
||||||
// Delete all references from the FD lookup-table
|
// Delete all references from the FD lookup-table
|
||||||
for (int j = 0; j < VFS_MAX_COUNT; ++j) {
|
for (int j = 0; j < MAX_FDS; ++j) {
|
||||||
if (s_fd_table[j].vfs_index == vfs_id) {
|
if (s_fd_table[j].vfs_index == vfs_id) {
|
||||||
s_fd_table[j] = FD_TABLE_ENTRY_UNUSED;
|
s_fd_table[j] = FD_TABLE_ENTRY_UNUSED;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user