added basic ssl support to ircu
[ircu2.10.12-pk.git] / ircd / list.c
index cbf98c5eedccacdb65227182337ca82dd63eb06b..d304e162d6ac5875f91750db5f6ac036a268b006 100644 (file)
@@ -269,7 +269,7 @@ void free_client(struct Client* cptr)
         cptr, cli_connect(cptr)));
 
   if (cli_auth(cptr))
-    destroy_auth_request(cli_auth(cptr), 0);
+    destroy_auth_request(cli_auth(cptr));
 
   /* Make sure we didn't magically get re-added to the list */
   assert(cli_next(cptr) == 0);
@@ -436,6 +436,7 @@ struct SLink* make_link(void)
   }
   assert(0 != lp);
   links.inuse++;
+  memset(lp, 0, sizeof(*lp));
   return lp;
 }
 
@@ -447,8 +448,8 @@ void free_link(struct SLink* lp)
   if (lp) {
     lp->next = slinkFreeList;
     slinkFreeList = lp;
+    links.inuse--;
   }
-  links.inuse--;
 }
 
 /** Add an element to a doubly linked list.