Category& log = Category::getInstance("shibtarget.STConfig");
log.info("shutting down the library");
delete m_tranLogLock;
+ m_tranLogLock = NULL;
//delete m_tranLog; // This is crashing for some reason, but we're shutting down anyway.
delete m_ini;
+ m_ini = NULL;
ShibConfig::getConfig().term();
SAMLConfig::getConfig().term();
log.info("library shutdown complete");
clnt_destroy(m_clnt);
m_clnt=NULL;
IConfig* conf=ShibTargetConfig::getConfig().getINI();
- Locker locker(conf);
- conf->getListener()->close(m_sock);
- m_sock=(IListener::ShibSocket)0;
+ if (conf) {
+ Locker locker(conf);
+ conf->getListener()->close(m_sock);
+ m_sock=(IListener::ShibSocket)0;
+ }
+ else
+ m_sock=(IListener::ShibSocket)0;
}
}