From 5b392ea020897afbc546274e6a6c64802ccfe546 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 12:09:00 +0100 Subject: [PATCH] libcollectdclient: free result of getaddrinfo CID #37997 Signed-off-by: Florian Forster --- src/libcollectdclient/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 5db98e58..802e6439 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -526,9 +526,11 @@ static int lcc_open_netsocket (lcc_connection_t *c, /* {{{ */ if (status != 0) { lcc_set_errno (c, status); + freeaddrinfo (ai_res); return (-1); } + freeaddrinfo (ai_res); return (0); } /* }}} int lcc_open_netsocket */ -- 2.30.2