mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 11:51:01 +00:00
Fix hiredis getaddrinfo leak
Fixed in Redis by 1a5e5b6
, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.
Closes #2012
This commit is contained in:
parent
747b57cfb6
commit
56c1f8805e
1
deps/hiredis/net.c
vendored
1
deps/hiredis/net.c
vendored
@ -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