Skip to content

Commit

Permalink
cluster: fix node connection memory leak
Browse files Browse the repository at this point in the history
Cluster leaks memory while connecting due to missing freeaddrinfo()

Closes #1801
  • Loading branch information
kingsumos authored and mattsta committed Aug 2, 2014
1 parent 7da1992 commit 0efac15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/anet.c
Expand Up @@ -276,6 +276,7 @@ static int anetTcpGenericConnect(char *err, char *addr, int port,
anetSetError(err, "bind: %s", strerror(errno));
goto end;
}
freeaddrinfo(bservinfo);
}
if (connect(s,p->ai_addr,p->ai_addrlen) == -1) {
/* If the socket is non-blocking, it is ok for connect() to
Expand Down

0 comments on commit 0efac15

Please sign in to comment.