summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-05-26 16:32:52 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-05-26 16:32:52 +0200
commitdbfcd7ec72ae1a018a8a0653bc726df2e6b0b14d (patch)
tree65fbc8522ef0e35fa232b985248dba6f9968db60 /src
parentdbe3514cd6a1b20f87437a3edd952618d14aff9e (diff)
downloadweechat-dbfcd7ec72ae1a018a8a0653bc726df2e6b0b14d.zip
irc: fix memory leak in message parser (when called from other plugins like relay) (bug #33387)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-message.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index 0ba89486c..c4314e0f6 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -194,6 +194,17 @@ irc_message_parse_to_hashtable (const char *message)
weechat_hashtable_set (hashtable, "channel", (channel) ? channel : empty_str);
weechat_hashtable_set (hashtable, "arguments", (arguments) ? arguments : empty_str);
+ if (nick)
+ free (nick);
+ if (host)
+ free (host);
+ if (command)
+ free (command);
+ if (channel)
+ free (channel);
+ if (arguments)
+ free (arguments);
+
return hashtable;
}