- try {
- e = XMLHelper::getFirstChildElement(e, _AccessControl);
- while (e) {
- string t(XMLHelper::getAttrString(e, nullptr, _type));
- if (!t.empty()) {
- Category::getInstance(SHIBSP_LOGCAT".AccessControl.Chaining").info("building AccessControl provider of type (%s)...", t.c_str());
- m_ac.push_back(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), e));
- }
- e = XMLHelper::getNextSiblingElement(e, _AccessControl);
+ e = XMLHelper::getFirstChildElement(e, _AccessControl);
+ while (e) {
+ string t(XMLHelper::getAttrString(e, nullptr, _type));
+ if (!t.empty()) {
+ Category::getInstance(SHIBSP_LOGCAT ".AccessControl.Chaining").info("building AccessControl provider of type (%s)...", t.c_str());
+ auto_ptr<AccessControl> np(SPConfig::getConfig().AccessControlManager.newPlugin(t.c_str(), e));
+ m_ac.push_back(np.get());
+ np.release();