aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-07-25 22:23:54 +0100
committerJames Booth <boothj5@gmail.com>2016-07-25 22:23:54 +0100
commitd5d04756ce278852cb465541f3b5bb4cf84f66ca (patch)
treef6b38aede1000ff81d20d65af3325fc22bc53e8b /src
parent943e91268c2489600ac1f28836fd0e24a0fd8dc2 (diff)
downloadprofani-tty-d5d04756ce278852cb465541f3b5bb4cf84f66ca.tar.gz
Fix memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/log.c3
-rw-r--r--src/plugins/callbacks.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 2c1bf7bc..e091f347 100644
--- a/src/log.c
+++ b/src/log.c
@@ -403,7 +403,7 @@ _chat_log_chat(const char *const login, const char *const other, const char *con
void
groupchat_log_chat(const gchar *const login, const gchar *const room, const gchar *const nick, const gchar *const msg)
{
- gchar *room_copy = strdup(room);
+ char *room_copy = strdup(room);
struct dated_chat_log *dated_log = g_hash_table_lookup(groupchat_logs, room_copy);
// no log for room
@@ -416,6 +416,7 @@ groupchat_log_chat(const gchar *const login, const gchar *const room, const gcha
dated_log = _create_groupchat_log(room_copy, login);
g_hash_table_replace(logs, room_copy, dated_log);
}
+ free(room_copy);
GDateTime *dt = g_date_time_new_now_local();
diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c
index 40a35400..364cb669 100644
--- a/src/plugins/callbacks.c
+++ b/src/plugins/callbacks.c
@@ -299,6 +299,7 @@ plugins_run_command(const char * const input)
curr_hash = g_list_next(curr_hash);
}
+ g_list_free(command_hashes);
g_strfreev(split);
return FALSE;
}