diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 12:29:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 12:29:22 +0100 |
commit | ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb (patch) | |
tree | 55cebfa7f54b14601eccbd1bf1f50e33ceee5d76 /src/kernel/user/nullfs.c | |
parent | 630c28c3fd3297c7a0ea7ec7ad4417f521fdaa7f (diff) | |
download | kogata-ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb.tar.gz kogata-ba53137f1b687b1c9cbd66fbe306ed1bf6d0cccb.zip |
Change hashtbl memory freeing method
Diffstat (limited to 'src/kernel/user/nullfs.c')
-rw-r--r-- | src/kernel/user/nullfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/user/nullfs.c b/src/kernel/user/nullfs.c index 1685f4c..97f3d00 100644 --- a/src/kernel/user/nullfs.c +++ b/src/kernel/user/nullfs.c @@ -149,7 +149,7 @@ bool nullfs_fs_make(fs_handle_t *source, char* opts, fs_t *fs_s) { root->fs = fs; root->items_list = 0; root->lock = MUTEX_UNLOCKED; - root->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0); + root->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0); if (root->items_idx == 0) { free(root); free(fs); @@ -308,7 +308,7 @@ bool nullfs_d_delete(fs_node_ptr n, const char* file) { nullfs_dir_t* sd = (nullfs_dir_t*)i->data; if (sd->items_list != 0) return false; - delete_hashtbl(sd->items_idx, 0); + delete_hashtbl(sd->items_idx); free(sd); } else if (i->ops == &nullfs_f_ops) { nullfs_file_t* f = (nullfs_file_t*)i->data; @@ -384,7 +384,7 @@ bool nullfs_d_create(fs_node_ptr n, const char* file, int type) { nullfs_dir_t *x = (nullfs_dir_t*)malloc(sizeof(nullfs_dir_t)); if (x == 0) return false; - x->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0, 0); + x->items_idx = create_hashtbl(str_key_eq_fun, str_hash_fun, 0); if (x->items_idx == 0) goto d_error; x->items_list = 0; @@ -411,7 +411,7 @@ bool nullfs_d_create(fs_node_ptr n, const char* file, int type) { d_error: if (i != 0 && i->name != 0) free(i->name); if (i != 0) free(i); - if (x->items_idx != 0) delete_hashtbl(x->items_idx, 0); + if (x->items_idx != 0) delete_hashtbl(x->items_idx); free(x); return false; } else { |