Fix getaddrinfo() memory leak

See antirez/redis#2012 for the leak causing unbounded memory growth.
master
Matt Stancliff 2014-09-18 14:51:27 -04:00
parent 2602e1b6bc
commit 537a8845d1
1 changed files with 1 additions and 0 deletions

1
net.c
View File

@ -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));