From 2b846688545bf947722a0437608a793202f80cf6 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 27 Mar 2011 14:04:10 +0000 Subject: [PATCH] Fix a theoretical memory leak in a cannot-realistically-happen situation in rfc2553_connect_to(). --- jbsockets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jbsockets.c b/jbsockets.c index 103a2b97..efc344c7 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.95 2011/03/27 14:03:25 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.96 2011/03/27 14:03:43 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -232,6 +232,7 @@ static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client csp->http->host_ip_addr_str = malloc(NI_MAXHOST); if (NULL == csp->http->host_ip_addr_str) { + freeaddrinfo(result); log_error(LOG_LEVEL_ERROR, "Out of memory while getting the server IP address."); return JB_INVALID_SOCKET; -- 2.39.2