Avoid extra decrements of links.inuse.
authorMichael Poole <mdpoole@troilus.org>
Sun, 18 Mar 2007 01:33:02 +0000 (01:33 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 18 Mar 2007 01:33:02 +0000 (01:33 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1781 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/list.c

index 908bc5fd9ed6c3fa8637de79ff4578874620f04d..034218dfb2b09513ef5e78775e8e55a8167a837c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-17  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/list.c (free_link): Only decrement the in-use count of
+       links if we free a link.
+
 2007-03-17  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/s_err.c: update replies to handle new fields in
index 1f75ab926b96b9b3fa40624f7767f45b43d0ff6c..d304e162d6ac5875f91750db5f6ac036a268b006 100644 (file)
@@ -448,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.