2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +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
int unload() {
if (impl) {
IOServiceMgr::instance().unregisterIOService(impl->getIOService());
impl->getIOService()->stopAndPoll();
IOServicePtr io_service = impl->getIOService();
IOServiceMgr::instance().unregisterIOService(io_service);
io_service->stopAndPoll();
impl.reset();
io_service->stopAndPoll();
}
impl.reset();
LOG_INFO(ha_logger, HA_DEINIT_OK);
return (0);
}