From 68b70fb185413a653acdd1b2f72a48aef498bd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 17 Jan 2016 08:21:45 +0100 Subject: [PATCH] irc: free allocated memory in case of early exit from the function --- src/plugins/irc/irc-command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 7a30f596a..f5f344a0b 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -1398,7 +1398,10 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc, ctcp_type = strdup (argv[arg_type]); if (!ctcp_type) + { + weechat_string_free_split (targets); WEECHAT_COMMAND_ERROR; + } weechat_string_toupper (ctcp_type);