This is an automated email from the ASF dual-hosted git repository.
ifplusor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new d1881a5 fix memory leak
d1881a5 is described below
commit d1881a5df0b848f73e5f35a7cdcb795887a54705
Author: SRC-xiaojin <[email protected]>
AuthorDate: Tue Jun 28 00:56:27 2022 +0800
fix memory leak
---
src/transport/ClientRemotingProcessor.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/transport/ClientRemotingProcessor.cpp
b/src/transport/ClientRemotingProcessor.cpp
index 6303684..a98d9ab 100644
--- a/src/transport/ClientRemotingProcessor.cpp
+++ b/src/transport/ClientRemotingProcessor.cpp
@@ -61,6 +61,8 @@ RemotingCommand*
ClientRemotingProcessor::resetOffset(RemotingCommand* request)
ResetOffsetRequestHeader* offsetHeader =
(ResetOffsetRequestHeader*)request->getCommandHeader();
if (offsetBody) {
m_mqClientFactory->resetOffset(offsetHeader->getGroup(),
offsetHeader->getTopic(), offsetBody->getOffsetTable());
+ delete offsetBody;
+ offsetBody = nullptr;
} else {
LOG_ERROR("resetOffset failed as received data could not be
unserialized");
}