Fix another SILENCE crash.
[ircu2.10.12-pk.git] / ircd / channel.c
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);