Fix a segfault on *BSD
freeaddrinfo is not required by POSIX to be NULL-safe. OpenBSD will SIGSEGV. NetBSD will assert. FreeBSD up to 11.1 will SIGSEGV, while in future versions, it will be a silent NOP [1]. Commitd4b715f0aa
("Fix potential race in 'invalid timeout' tests") added a code path to _redisContextConnectTcp which calls freeaddrinfo(NULL), triggering the segfault. Put a NULL check around the call to freeaddrinfo. [1] -e916723903
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
This commit is contained in:
parent
d1c1b668c1
commit
546d9415e1
Loading…
Reference in New Issue
Block a user