diff options
author | James Booth <boothj5@gmail.com> | 2015-02-10 19:53:34 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-02-10 19:53:34 +0000 |
commit | 22b92c751445b14e35b9b0e94479f79d2434c0a5 (patch) | |
tree | b615054567e54becd01ed49d26d13abf06ce730e | |
parent | 75d766387677c783694df9ccfda9dffbb3bf4ef7 (diff) | |
download | profani-tty-22b92c751445b14e35b9b0e94479f79d2434c0a5.tar.gz |
Used g_hash_table_destroy to free logs
-rw-r--r-- | src/log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/log.c b/src/log.c index c525c3d9..4270a54f 100644 --- a/src/log.c +++ b/src/log.c @@ -236,7 +236,7 @@ chat_log_init(void) { session_started = g_date_time_new_now_local(); log_info("Initialising chat logs"); - logs = g_hash_table_new_full(g_str_hash, (GEqualFunc) _key_equals, g_free, + logs = g_hash_table_new_full(g_str_hash, (GEqualFunc) _key_equals, free, (GDestroyNotify)_free_chat_log); } @@ -244,7 +244,7 @@ void groupchat_log_init(void) { log_info("Initialising groupchat logs"); - groupchat_logs = g_hash_table_new_full(g_str_hash, (GEqualFunc) _key_equals, g_free, + groupchat_logs = g_hash_table_new_full(g_str_hash, (GEqualFunc) _key_equals, free, (GDestroyNotify)_free_chat_log); } @@ -396,8 +396,8 @@ chat_log_get_previous(const gchar * const login, const gchar * const recipient) void chat_log_close(void) { - g_hash_table_remove_all(logs); - g_hash_table_remove_all(groupchat_logs); + g_hash_table_destroy(logs); + g_hash_table_destroy(groupchat_logs); g_date_time_unref(session_started); } |