Free primes

This commit is contained in:
James Booth
2015-05-18 00:33:24 +01:00
parent da6bf143c7
commit c6fb212a74
3 changed files with 11 additions and 0 deletions

View File

@@ -13,6 +13,15 @@ prime_init(void)
idstubs = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
}
void
prime_free_all(void)
{
free(required_passwd);
if (idstubs) {
g_hash_table_destroy(idstubs);
}
}
void
prime_required_passwd(char *password)
{

View File

@@ -2,6 +2,7 @@
#define __H_PRIME
void prime_init(void);
void prime_free_all(void);
void prime_required_passwd(char *password);
char* prime_get_passwd(void);

View File

@@ -226,6 +226,7 @@ _shutdown(void)
shutdown(listen_socket, 2);
close(listen_socket);
prime_free_all();
stanza_free_all();
log_close();
}