From 3528e358cc7f48e0fe5c96b55e4196b8dae84744 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 17 Aug 2020 14:02:28 +0200 Subject: [PATCH] Free memory from getaddrinfo() We handled this in the failure scenario, but not in the vastly more common successful case. --- common/network/TcpSocket.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index e59704e..a1d3737 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -610,6 +610,8 @@ void network::createTcpListeners(std::list *listeners, freeaddrinfo(ai); throw; } + + freeaddrinfo(ai); } void network::createTcpListeners(std::list *listeners,