From: Fabian Keil Date: Sun, 27 Mar 2011 14:04:10 +0000 (+0000) Subject: Fix a theoretical memory leak in a cannot-realistically-happen situation in rfc2553_c... X-Git-Tag: v_3_0_18~274 X-Git-Url: http://www.privoxy.org/gitweb/templates.html?a=commitdiff_plain;h=2b846688545bf947722a0437608a793202f80cf6;p=privoxy.git Fix a theoretical memory leak in a cannot-realistically-happen situation in rfc2553_connect_to(). --- 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;