Commit 61eeedbe authored by Matt Stancliff's avatar Matt Stancliff
Browse files

Fix potential undefined struct read

All the assignments to cb are inside conditionals, so it's
vaguely possible it never gets initialized before we try
to read from it with (cb.fn == NULL).

Condition discovered with scan-build.

Closes #229
parent e35266e6
......@@ -391,7 +391,7 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
void redisProcessCallbacks(redisAsyncContext *ac) {
redisContext *c = &(ac->c);
redisCallback cb;
redisCallback cb = {NULL, NULL, NULL};
void *reply = NULL;
int status;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment