Don't leak csp->http->host_ip_addr_str when calling no_rfc2553_connect_to() multiple...
authorFabian Keil <fk@fabiankeil.de>
Sun, 27 Mar 2011 13:56:27 +0000 (13:56 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 27 Mar 2011 13:56:27 +0000 (13:56 +0000)
jbsockets.c

index a287c76..8424c02 100644 (file)
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.86 2011/03/27 13:55:09 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.87 2011/03/27 13:55:55 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -384,6 +384,9 @@ static jb_socket no_rfc2553_connect_to(const char *host, int portnum, struct cli
    struct access_control_addr dst[1];
 #endif /* def FEATURE_ACL */
 
+   /* Don't leak memory when retrying. */
+   freez(csp->http->host_ip_addr_str);
+
    memset((char *)&inaddr, 0, sizeof inaddr);
 
    if ((addr = resolve_hostname_to_ip(host)) == INADDR_NONE)