diff options
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -809,8 +809,7 @@ static redisContext *redisContextInit() { } void redisFree(redisContext *c) { - /* Disconnect before free'ing if not yet disconnected. */ - if (c->flags & REDIS_CONNECTED) + if (c->fd > 0) close(c->fd); if (c->errstr != NULL) sdsfree(c->errstr); |