aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-03-04 12:30:29 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-03-04 12:30:29 +0100
commit639ec6dd97a3d27fd249fa0509f0f8ebfd1f4c91 (patch)
tree277b9902a1f77eceac0c5bc524311833d417719f /src/kernel/user
parent4cc6defbbd0e7b668b843212e4b5e450266be442 (diff)
downloadkogata-639ec6dd97a3d27fd249fa0509f0f8ebfd1f4c91.tar.gz
kogata-639ec6dd97a3d27fd249fa0509f0f8ebfd1f4c91.zip
Fix stupid forget-to-unreference bug.
Diffstat (limited to 'src/kernel/user')
-rw-r--r--src/kernel/user/process.c6
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) {