Browse Source

Free servinfo after p is checked in setup stratum socket.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
1a43cb0b17
  1. 3
      util.c

3
util.c

@ -1525,12 +1525,13 @@ static bool setup_stratum_socket(struct pool *pool) @@ -1525,12 +1525,13 @@ static bool setup_stratum_socket(struct pool *pool)
break;
}
freeaddrinfo(servinfo);
if (p == NULL) {
applog(LOG_WARNING, "Failed to find servinfo on %s:%s",
pool->sockaddr_url, pool->stratum_port);
freeaddrinfo(servinfo);
return false;
}
freeaddrinfo(servinfo);
if (!pool->sockbuf) {
pool->sockbuf = calloc(RBUFSIZE, 1);

Loading…
Cancel
Save