This eliminates a bunch of valgrind memory leak warnings when
run with --leak-check=full --show-leak-kinds=all.
}
vss_shutdown();
shm_detach(mmd);
}
vss_shutdown();
shm_detach(mmd);
lls_free_parse_result(server_lpr, CMD_PTR);
if (server_lpr != cmdline_lpr)
lls_free_parse_result(cmdline_lpr, CMD_PTR);
lls_free_parse_result(server_lpr, CMD_PTR);
if (server_lpr != cmdline_lpr)
lls_free_parse_result(cmdline_lpr, CMD_PTR);
+/**
+ * Remove all entries from the user list.
+ *
+ * This is called on shutdown and when the user list is reloaded because the
+ * server received SIGHUP.
+ */
+void user_list_deplete(void)
+{
+ struct user *u, *tmpu;
+
+ list_for_each_entry_safe(u, tmpu, &user_list, node) {
+ list_del(&u->node);
+ free(u->name);
+ free_public_key(u->pubkey);
+ free(u);
+ }
+}
+
/**
* Initialize the list of users allowed to connect to para_server.
*
/**
* Initialize the list of users allowed to connect to para_server.
*
{
int ret = -E_USERLIST;
FILE *file_ptr = fopen(user_list_file, "r");
{
int ret = -E_USERLIST;
FILE *file_ptr = fopen(user_list_file, "r");
- list_for_each_entry_safe(u, tmpu, &user_list, node) {
- list_del(&u->node);
- free(u->name);
- free_public_key(u->pubkey);
- free(u);
- }
for (;;) {
int num;
char line[255];
for (;;) {
int num;
char line[255];
};
void user_list_init(char *user_list_file);
};
void user_list_init(char *user_list_file);
+void user_list_deplete(void);
const struct user *user_list_lookup(const char *name);
const struct user *user_list_lookup(const char *name);