Commit a2d57835094cd5f258df38bdf31eb29e6fede750

ckolivas 2012-10-30T16:45:27

server and client sockaddr_in are no longer used in struct pool.

diff --git a/miner.h b/miner.h
index 16dcbe3..4f79da2 100644
--- a/miner.h
+++ b/miner.h
@@ -872,7 +872,6 @@ struct pool {
 	CURL *stratum_curl;
 	SOCKETTYPE sock;
 	char sockbuf[RBUFSIZE];
-	struct sockaddr_in *server, client;
 	char *sockaddr_url; /* stripped url used for sockaddr */
 	char *nonce1;
 	uint32_t nonce2;
diff --git a/util.c b/util.c
index 02de173..dcc11c4 100644
--- a/util.c
+++ b/util.c
@@ -876,8 +876,8 @@ bool extract_sockaddr(struct pool *pool, char *url)
 		applog(LOG_DEBUG, "Failed to extract sock addr");
 		return false;
 	}
+	freeaddrinfo(res);
 
-	pool->server = (struct sockaddr_in *)res->ai_addr;
 	pool->sockaddr_url = strdup(url_address);
 
 	return true;