Attempt to fix SF bug #2874316 by invalidating a file descriptor that the system...
[ircu2.10.12-pk.git] / ircd / list.c
index d304e162d6ac5875f91750db5f6ac036a268b006..f6a11328ffedbc84b6f3f4a65309aa77b6bd9c15 100644 (file)
@@ -427,6 +427,9 @@ void verify_client_list(void)
  */
 struct SLink* make_link(void)
 {
+#if 1
+  struct SLink* lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
+#else
   struct SLink* lp = slinkFreeList;
   if (lp)
     slinkFreeList = lp->next;
@@ -434,6 +437,7 @@ struct SLink* make_link(void)
     lp = (struct SLink*) MyMalloc(sizeof(struct SLink));
     links.alloc++;
   }
+#endif
   assert(0 != lp);
   links.inuse++;
   memset(lp, 0, sizeof(*lp));
@@ -446,8 +450,12 @@ struct SLink* make_link(void)
 void free_link(struct SLink* lp)
 {
   if (lp) {
+#if 1
+    MyFree(lp);
+#else
     lp->next = slinkFreeList;
     slinkFreeList = lp;
+#endif
     links.inuse--;
   }
 }