------------------------------------------------------------ revno: 12373 revision-id: squid3@treenet.co.nz-20121028052521-14kumpo6bzm8rkjp parent: squid3@treenet.co.nz-20121020112946-carr1ox63p1wdptu committer: Amos Jeffries branch nick: 3.3 timestamp: Sat 2012-10-27 23:25:21 -0600 message: Add constructore/destructor for Mgr::ActionPasswordList Missing constructor for Mgr::ActionPasswordList resulted in invalid values for next pointer and segmentation fault parsing multiple cachemgr_passwd directives. Missing destructor resulted in memory leaks on reconfigure and shutdown. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121028052521-14kumpo6bzm8rkjp # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 68f21b5302bb1c0d974da35b1c1219ce0033bfee # timestamp: 2012-10-28 05:55:32 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121020112946-\ # carr1ox63p1wdptu # # Begin patch === modified file 'src/mgr/ActionPasswordList.cc' --- src/mgr/ActionPasswordList.cc 2012-09-18 14:06:31 +0000 +++ src/mgr/ActionPasswordList.cc 2012-10-28 05:25:21 +0000 @@ -29,4 +29,11 @@ #include "squid.h" #include "mgr/ActionPasswordList.h" +#include "wordlist.h" +Mgr::ActionPasswordList::~ActionPasswordList() +{ + safe_free(passwd); + wordlistDestroy(&actions); + delete next; +} === modified file 'src/mgr/ActionPasswordList.h' --- src/mgr/ActionPasswordList.h 2012-10-04 00:23:44 +0000 +++ src/mgr/ActionPasswordList.h 2012-10-28 05:25:21 +0000 @@ -38,6 +38,9 @@ class ActionPasswordList { public: + ActionPasswordList() : passwd(NULL), actions(NULL), next(NULL) {} + ~ActionPasswordList(); + char *passwd; wordlist *actions; ActionPasswordList *next;