From 13241cdca5b39415d2a0f9e1b55a79153d14ba07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 20 Jul 2023 08:49:23 +0200 Subject: [PATCH] irc: fix memory leak in IRC message parser Bug was introduced in WeeChat 3.4 by commit c4b4d80936b5b1fe9f179a481f5c3a325ff8e42e. --- ChangeLog.adoc | 1 + src/plugins/irc/irc-message.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 59cb9b58e..3b6690874 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -38,6 +38,7 @@ Bug fixes:: * irc: fix display of country code in message 344 received as whois geo info (issue #1736) * irc: add missing "account-tag" in list of supported capabilities * irc: fix display of self CTCP message containing bold attribute (issue #1981) + * irc: fix memory leak in IRC message parser * script: fix cursor position after `/script list -i` or `/script list -il` * script: fix buffer used by command `/script list -i|-il|-o|-ol` diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index f89e673f8..4889dc7a1 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -529,6 +529,8 @@ irc_message_parse_to_hashtable (struct t_irc_server *server, free (arguments); if (text) free (text); + if (params) + weechat_string_free_split (params); return hashtable; }