Correctly free members of the iauth string list.
authorMichael Poole <mdpoole@troilus.org>
Wed, 11 Apr 2007 03:25:21 +0000 (03:25 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 11 Apr 2007 03:25:21 +0000 (03:25 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1800 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd_parser.y

index 7c19be447871c31ef6187469eca27c3a2086cfa6..1c09460091e767c6d05c7feaa29ee67998c24c96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-10  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/ircd_parser.y (iauth): Avoid problems related to MyFree's
+       multiple evaluation of its argument.
+
 2007-04-10  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_gline.c (ms_gline): lastmod must be non-zero
index d75d32f9f7c25fb9ba0339aa3a9f645a5ce6d668..ccef4a76b058a36dcccfd1b4729975bb9795a770 100644 (file)
@@ -1139,7 +1139,10 @@ iauthblock: IAUTH '{' iauthitems '}' ';'
 {
   auth_spawn(stringno, stringlist);
   while (stringno > 0)
-    MyFree(stringlist[--stringno]);
+  {
+    --stringno;
+    MyFree(stringlist[stringno]);
+  }
 };
 
 iauthitems: iauthitem iauthitems | iauthitem;
@@ -1147,5 +1150,8 @@ iauthitem: iauthprogram;
 iauthprogram: PROGRAM '='
 {
   while (stringno > 0)
-    MyFree(stringlist[--stringno]);
+  {
+    --stringno;
+    MyFree(stringlist[stringno]);
+  }
 } stringlist ';';