From: Michael Poole Date: Sat, 19 Feb 2005 05:30:44 +0000 (+0000) Subject: Fix another SILENCE crash. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=925874acc6f8c1ee0da10d341e0296dd3db2394a Fix another SILENCE crash. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1315 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index be50080..16c7c21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * ircd/IPcheck.c (ip_registry_find): Use canonical form of IP address to look up and compare against hash entries. + * ircd/channel.c (apply_ban): Do not free a succesful BAN_DEL ban. + * ircd/ircd_parser.y (clientblock): Stash IP string in aconf->name. (clienthost): Split hosts that contain '@' into username and host. (clientip): Split IPs that contain '@' into username and IP. diff --git a/ircd/channel.c b/ircd/channel.c index 1a3963d..b264db7 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -2729,12 +2729,14 @@ int apply_ban(struct Ban **banlist, struct Ban *newban, int do_free) remove_count++; } } + if (remove_count) + return 0; + /* If no matches were found, fail. */ if (do_free) free_ban(newban); else MyFree(newban->banstr); - /* If no matches were found, fail. */ - return remove_count ? 0 : 3; + return 3; } if (do_free) free_ban(newban);