diff --git a/Redirector/EventHandler.cpp b/Redirector/EventHandler.cpp index 3e721ead..e26ed565 100644 --- a/Redirector/EventHandler.cpp +++ b/Redirector/EventHandler.cpp @@ -146,13 +146,22 @@ bool eh_init() if (!DNSHandler::INIT()) return false; - return TCPHandler::INIT(); + if (!TCPHandler::INIT()) + return false; + + return true; } void eh_free() { + lock_guard lg(udpContextLock); + TCPHandler::FREE(); + for (auto i : udpContext) + delete i.second; + udpContext.clear(); + UP = 0; DL = 0; }