summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/plugins/irc/irc-message.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index df7307bf9..09b0b4529 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@ Version 0.3.6 (under dev!)
/window scroll_horiz) (task #11112)
* api: fix bug with function config_set_desc_plugin (use immediately
description for option when function is called)
+* irc: fix memory leak in message parser (when called from other plugins like
+ relay) (bug #33387)
* irc: fix memory leak on plugin unload (free ignores)
* logger: add option logger.file.flush_delay (task #11118)
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;
}