From b415e08d7b105842bc866a7dbf41e828ea455c82 Mon Sep 17 00:00:00 2001 From: XieHan Date: Fri, 29 Jan 2021 00:50:21 +0800 Subject: [PATCH] fix ProtocolMessage operator= rvalue --- src/protocol/ProtocolMessage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocol/ProtocolMessage.h b/src/protocol/ProtocolMessage.h index d0ca9431..0366a527 100644 --- a/src/protocol/ProtocolMessage.h +++ b/src/protocol/ProtocolMessage.h @@ -101,6 +101,7 @@ public: { this->size_limit = msg.size_limit; msg.size_limit = (size_t)-1; + delete this->attachment; this->attachment = msg.attachment; msg.attachment = NULL; }