summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-ignore.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-24 23:28:37 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-25 20:59:24 +0200
commit2bbf289635aaa44fe05e2da0f48583c099080a34 (patch)
tree72deb215d0fb87bc860d1a104bc2e0a145309efa /src/plugins/irc/irc-ignore.c
parentf3a9bfe55e7f7a574681a695d3ba99455feb08ed (diff)
downloadweechat-2bbf289635aaa44fe05e2da0f48583c099080a34.zip
irc: remove check of NULL pointers before calling free() (issue #865)
Diffstat (limited to 'src/plugins/irc/irc-ignore.c')
-rw-r--r--src/plugins/irc/irc-ignore.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c
index 57d408ee8..4fb9d5f89 100644
--- a/src/plugins/irc/irc-ignore.c
+++ b/src/plugins/irc/irc-ignore.c
@@ -309,17 +309,14 @@ irc_ignore_free (struct t_irc_ignore *ignore)
}
/* free data */
- if (ignore->mask)
- free (ignore->mask);
+ free (ignore->mask);
if (ignore->regex_mask)
{
regfree (ignore->regex_mask);
free (ignore->regex_mask);
}
- if (ignore->server)
- free (ignore->server);
- if (ignore->channel)
- free (ignore->channel);
+ free (ignore->server);
+ free (ignore->channel);
/* remove ignore from list */
if (ignore->prev_ignore)