]> git.tuebingen.mpg.de Git - adu.git/blobdiff - user.c
Simplify user table closing.
[adu.git] / user.c
diff --git a/user.c b/user.c
index 1f7e04a26f32cae30636c21b04a0092a14f2c3de..2b9fb202ed9f2dbc3cb584d45af659c9370c74b0 100644 (file)
--- a/user.c
+++ b/user.c
@@ -298,12 +298,6 @@ void create_hash_table(unsigned bits)
                sizeof(struct user_info));
 }
 
-void free_hash_table(void)
-{
-       free(uid_hash_table);
-       uid_hash_table = NULL;
-}
-
 static int close_user_table(struct user_info *ui, __a_unused void *data)
 {
        int ret;
@@ -328,6 +322,8 @@ static int close_user_table(struct user_info *ui, __a_unused void *data)
 void close_user_tables(void)
 {
        for_each_admissible_user(close_user_table, NULL);
+       free(uid_hash_table);
+       uid_hash_table = NULL;
 }
 
 /*