提交 cf143b57 编写于 作者: M Matt Stancliff 提交者: antirez

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
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册