From 86e1c7c31b4e406a023c93e5f702de4163266afd Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Wed, 11 Apr 2007 03:25:21 +0000 Subject: [PATCH] Correctly free members of the iauth string list. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1800 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/ircd_parser.y | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c19be4..1c09460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-10 Michael Poole + + * ircd/ircd_parser.y (iauth): Avoid problems related to MyFree's + multiple evaluation of its argument. + 2007-04-10 Kevin L. Mitchell * ircd/m_gline.c (ms_gline): lastmod must be non-zero diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index d75d32f..ccef4a7 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -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 ';'; -- 2.20.1