From 49974c9359ad6b58cea15106cf6511bdb31d31a9 Mon Sep 17 00:00:00 2001 From: Mark Nunberg Date: Sun, 4 Mar 2018 18:17:16 +0200 Subject: Call connect(2) again for non-blocking connect This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard. --- hiredis.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hiredis.c') diff --git a/hiredis.c b/hiredis.c index 98f43c9..351dfbc 100644 --- a/hiredis.c +++ b/hiredis.c @@ -606,12 +606,14 @@ void redisFree(redisContext *c) { return; if (c->fd > 0) close(c->fd); + sdsfree(c->obuf); redisReaderFree(c->reader); free(c->tcp.host); free(c->tcp.source_addr); free(c->unix_sock.path); free(c->timeout); + free(c->saddr); free(c); } -- cgit v1.2.3