diff options
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -88,7 +88,10 @@ static redisContext *connect(struct config config) { assert(NULL); } - if (c->err) { + if (c == NULL) { + printf("Connection error: can't allocate redis context\n"); + exit(1); + } else if (c->err) { printf("Connection error: %s\n", c->errstr); exit(1); } |