Merge pull request #274 from mattsta/fix-memory-leak
Fix getaddrinfo() memory leak
This commit is contained in:
commit
8f60ee6532
1
net.c
1
net.c
@ -300,6 +300,7 @@ static int _redisContextConnectTcp(redisContext *c, const char *addr, int port,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
freeaddrinfo(bservinfo);
|
||||||
if (!bound) {
|
if (!bound) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
snprintf(buf,sizeof(buf),"Can't bind socket: %s",strerror(errno));
|
snprintf(buf,sizeof(buf),"Can't bind socket: %s",strerror(errno));
|
||||||
|
Loading…
Reference in New Issue
Block a user