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.
#include "squid.h"
#include "mgr/ActionPasswordList.h"
+#include "wordlist.h"
+Mgr::ActionPasswordList::~ActionPasswordList()
+{
+ safe_free(passwd);
+ wordlistDestroy(&actions);
+ delete next;
+}
class ActionPasswordList
{
public:
+ ActionPasswordList() : passwd(NULL), actions(NULL), next(NULL) {}
+ ~ActionPasswordList();
+
char *passwd;
wordlist *actions;
ActionPasswordList *next;