diff --git a/net.c b/net.c index 4551f3e..7ce9ef4 100644 --- a/net.c +++ b/net.c @@ -412,7 +412,10 @@ addrretry: error: rv = REDIS_ERR; end: - freeaddrinfo(servinfo); + if(servinfo) { + freeaddrinfo(servinfo); + } + return rv; // Need to return REDIS_OK if alright }