From 537a8845d13509946344d47d6b3bc0be4211c7ac Mon Sep 17 00:00:00 2001 From: Matt Stancliff Date: Thu, 18 Sep 2014 14:51:27 -0400 Subject: Fix getaddrinfo() memory leak See antirez/redis#2012 for the leak causing unbounded memory growth. --- net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net.c b/net.c index 9fe80bb..bdb84ce 100644 --- a/net.c +++ b/net.c @@ -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)); -- cgit v1.2.3