From 2bbf289635aaa44fe05e2da0f48583c099080a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 24 Apr 2024 23:28:37 +0200 Subject: irc: remove check of NULL pointers before calling free() (issue #865) --- src/plugins/irc/irc-ignore.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/plugins/irc/irc-ignore.c') 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) -- cgit v1.2.3