Commit cf143b57 authored by Matt Stancliff's avatar Matt Stancliff Committed by antirez
Browse files

Fix hiredis getaddrinfo leak

Fixed in Redis by 1a5e5b6b, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.

Closes #2012
parent a6953496
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment