From: Razvan Becheriu Date: Thu, 4 Jul 2019 02:04:30 +0000 (+0300) Subject: [#639,!410] clear cache_ptr_ before unloading library X-Git-Tag: Kea-1.6.0-beta2~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbf42b12d047d07ca1fe717c6f86779416be5a2;p=thirdparty%2Fkea.git [#639,!410] clear cache_ptr_ before unloading library --- diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc index 94859dfad3..4ed8b9ee23 100644 --- a/src/lib/dhcpsrv/host_mgr.cc +++ b/src/lib/dhcpsrv/host_mgr.cc @@ -48,6 +48,9 @@ HostMgr::addBackend(const std::string& access) { bool HostMgr::delBackend(const std::string& db_type) { + if (getHostMgrPtr()->cache_ptr_->getType() == db_type) { + getHostMgrPtr()->cache_ptr_.reset(); + } return (HostDataSourceFactory::del(getHostMgrPtr()->alternate_sources_, db_type)); }