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 6523dcc  fixed incorrect delete operator
6523dcc is described below

commit 6523dcc3b309a1065375e40657f68f66bfeca38d
Author: Adam Leszczynski <[email protected]>
AuthorDate: Sun Sep 26 21:30:58 2021 +0200

    fixed incorrect delete operator
---
 src/extern/CProducer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/extern/CProducer.cpp b/src/extern/CProducer.cpp
index 0b139e2..58d00b6 100644
--- a/src/extern/CProducer.cpp
+++ b/src/extern/CProducer.cpp
@@ -273,7 +273,7 @@ int DestroyProducer(CProducer* pProducer) {
   }
   DefaultProducer* defaultMQProducer = (DefaultProducer*)pProducer;
   if (defaultMQProducer->version != NULL) {
-    delete defaultMQProducer->version;
+    delete[] defaultMQProducer->version;
     defaultMQProducer->version = NULL;
   }
   if (CAPI_C_PRODUCER_TYPE_TRANSACTION == defaultMQProducer->producerType) {

Reply via email to