]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Fix bug in rq_cleanup_fasttrack().
authorGunnar Beutner <redacted>
Fri, 12 Jul 2013 21:43:31 +0000 (23:43 +0200)
committerGunnar Beutner <redacted>
Fri, 12 Jul 2013 21:43:31 +0000 (23:43 +0200)
--HG--
branch : shroudrequest

request/request_fasttrack.c

index 6cd4521676a6f3b46db88dfd1baad06d3b50eb6a..9d088518d6e4dfff4c274652486407fbf231face 100644 (file)
@@ -77,7 +77,7 @@ static void rq_cleanup_fasttrack(void *arg) {
 
   pft = &ftlist;
 
-  for(ft=*pft;pft && *pft;pft=&((*pft)->next)) {
+  for(ft=*pft;*pft;pft=&((*pft)->next)) {
     int foundnick = 0;
 
     for(j=0;j<NICKHASHSIZE && !foundnick;j++) {
@@ -93,6 +93,9 @@ static void rq_cleanup_fasttrack(void *arg) {
       *pft = ft->next;
       free(ft);
     }
+
+    if (!*pft)
+      break;
   }
 }