Fix another SILENCE crash.
authorMichael Poole <mdpoole@troilus.org>
Sat, 19 Feb 2005 05:30:44 +0000 (05:30 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 19 Feb 2005 05:30:44 +0000 (05:30 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1315 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index be50080c7ec1d91bc86df46a67d913826ecb588e..16c7c2188a866c574c7614a100c770e38b818a02 100644 (file)
--- 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.
index 1a3963dbfff192064ceb6e83d2a4217bf7c61094..b264db71fb3051e0d6d2f218ead60c73f4c94d0e 100644 (file)
@@ -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);