Skip to content

Commit

Permalink
Fix hiredis getaddrinfo leak
Browse files Browse the repository at this point in the history
Fixed in Redis by 1a5e5b6, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.

Closes redis#2012
  • Loading branch information
mattsta authored and antirez committed Sep 19, 2014
1 parent 3f64424 commit beafebb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deps/hiredis/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 beafebb

Please sign in to comment.