diff options
Diffstat (limited to 'src/kernel/user')
-rw-r--r-- | src/kernel/user/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c index 4514218..0a757b4 100644 --- a/src/kernel/user/process.c +++ b/src/kernel/user/process.c @@ -290,7 +290,11 @@ fs_t *proc_find_fs(process_t *p, const char* name) { } void proc_remove_fs(process_t *p, const char* name) { - hashtbl_remove(p->filesystems, name); + fs_t *fs = proc_find_fs(p, name); + if (fs) { + unref_fs(fs); + hashtbl_remove(p->filesystems, name); + } } int proc_add_fd(process_t *p, fs_handle_t *f) { |