You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by if...@apache.org on 2022/07/09 20:54:11 UTC

[rocketmq-client-cpp] branch master updated: fix: free address info after get it using evutil_getaddrinfo (#431)

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 7bd42c6  fix: free address info after get it using evutil_getaddrinfo (#431)
7bd42c6 is described below

commit 7bd42c6a7688e863a29699d3c9001b6cfc6be591
Author: Chris Zhang <zh...@126.com>
AuthorDate: Sun Jul 10 04:54:05 2022 +0800

    fix: free address info after get it using evutil_getaddrinfo (#431)
---
 src/transport/TcpTransport.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/transport/TcpTransport.cpp b/src/transport/TcpTransport.cpp
index d297b1a..6776da5 100644
--- a/src/transport/TcpTransport.cpp
+++ b/src/transport/TcpTransport.cpp
@@ -126,6 +126,7 @@ u_long TcpTransport::getInetAddr(string& hostname) {
         }
       }
     }
+    evutil_freeaddrinfo(answer);
   }
 
   return addr;