No need for an extra function for freeing the hash table.
{
close_dir_table();
close_user_tables();
- free_hash_table();
}
static void signal_handler(int s)
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;
void close_user_tables(void)
{
for_each_admissible_user(close_user_table, NULL);
+ free(uid_hash_table);
+ uid_hash_table = NULL;
}
/*
void create_hash_table(unsigned bits);
void sort_hash_table(int (*comp)(const void *, const void *));
-void free_hash_table(void);
int for_each_admissible_user(int (*func)(struct user_info *, void *),
void *data);