From b1ce0d7a2e889080cd59244b5950eed1d644114c Mon Sep 17 00:00:00 2001 From: Bensong Liu <bensl@microsoft.com> Date: Tue, 28 Jul 2020 18:06:05 +0800 Subject: [PATCH] save before going back home --- src/forwarder.hpp | 4 ++++ src/protocols/plain.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/forwarder.hpp b/src/forwarder.hpp index 3698999..295b513 100644 --- a/src/forwarder.hpp +++ b/src/forwarder.hpp @@ -31,7 +31,11 @@ public: ptrOutbound = nullptr; // TODO else if (outboundConfig.starts_with("misc")) ptrOutbound = nullptr; // TODO + } + ~Forwarder() { + if (ptrInbound) delete ptrInbound; + if (ptrOutbound) delete ptrOutbound; } diff --git a/src/protocols/plain.hpp b/src/protocols/plain.hpp index fd0a327..9fd0e74 100644 --- a/src/protocols/plain.hpp +++ b/src/protocols/plain.hpp @@ -35,7 +35,7 @@ namespace Protocols { char buffer[DGRAM_BUFFER_SIZE]; // WARN: If you want to modify this program to work for both TCP and UDP, PLEASE use rlib::sockIO::recv instead of fixed buffer. - rlog.info("PlainListener listening [{}]:{} ...", listenAddr, listenPort); + rlog.info("PlainListener listening InboundPort [{}]:{} ...", listenAddr, listenPort); while (true) { // ... // epoll -- GitLab