1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

irc: remove check of NULL pointers before calling free() (issue #865)

This commit is contained in:
Sébastien Helleu
2024-04-24 23:28:37 +02:00
parent f3a9bfe55e
commit 2bbf289635
26 changed files with 374 additions and 752 deletions
+14 -28
View File
@@ -511,24 +511,15 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
snprintf (str_pos, sizeof (str_pos), "%d", pos_text);
weechat_hashtable_set (hashtable, "pos_text", str_pos);
if (tags)
free (tags);
if (message_without_tags)
free (message_without_tags);
if (nick)
free (nick);
if (user)
free (user);
if (host)
free (host);
if (command)
free (command);
if (channel)
free (channel);
if (arguments)
free (arguments);
if (text)
free (text);
free (tags);
free (message_without_tags);
free (nick);
free (user);
free (host);
free (command);
free (channel);
free (arguments);
free (text);
if (params)
weechat_string_free_split (params);
@@ -845,14 +836,10 @@ irc_message_ignored (struct t_irc_server *server, const char *message)
nick,
host_no_color);
if (nick)
free (nick);
if (host)
free (host);
if (host_no_color)
free (host_no_color);
if (channel)
free (channel);
free (nick);
free (host);
free (host_no_color);
free (channel);
return ignored;
}
@@ -1840,8 +1827,7 @@ end:
arguments);
}
if (tags)
free (tags);
free (tags);
if (argv)
weechat_string_free_split (argv);
if (argv_eol)