2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 00:15:17 +00:00

[#3449] fixed fd and memory leak

This commit is contained in:
Razvan Becheriu
2024-06-14 08:43:19 +03:00
parent 67842fcbe2
commit 0fe6f2e381

View File

@@ -429,10 +429,12 @@ int load(LibraryHandle& handle) {
/// @return 0 if deregistration was successful, 1 otherwise /// @return 0 if deregistration was successful, 1 otherwise
int unload() { int unload() {
if (impl) { if (impl) {
IOServiceMgr::instance().unregisterIOService(impl->getIOService()); IOServicePtr io_service = impl->getIOService();
impl->getIOService()->stopAndPoll(); IOServiceMgr::instance().unregisterIOService(io_service);
io_service->stopAndPoll();
impl.reset();
io_service->stopAndPoll();
} }
impl.reset();
LOG_INFO(ha_logger, HA_DEINIT_OK); LOG_INFO(ha_logger, HA_DEINIT_OK);
return (0); return (0);
} }