Skip to content

Commit

Permalink
Merge pull request redis#274 from mattsta/fix-memory-leak
Browse files Browse the repository at this point in the history
Fix getaddrinfo() memory leak
  • Loading branch information
antirez committed Sep 19, 2014
2 parents 2602e1b + 537a884 commit 8f60ee6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ static int _redisContextConnectTcp(redisContext *c, const char *addr, int port,
break;
}
}
freeaddrinfo(bservinfo);
if (!bound) {
char buf[128];
snprintf(buf,sizeof(buf),"Can't bind socket: %s",strerror(errno));
Expand Down

0 comments on commit 8f60ee6

Please sign in to comment.