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
This commit is contained in:
parent
e35266e68f
commit
61eeedbe77
2
async.c
2
async.c
@ -391,7 +391,7 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
|
|||||||
|
|
||||||
void redisProcessCallbacks(redisAsyncContext *ac) {
|
void redisProcessCallbacks(redisAsyncContext *ac) {
|
||||||
redisContext *c = &(ac->c);
|
redisContext *c = &(ac->c);
|
||||||
redisCallback cb;
|
redisCallback cb = {NULL, NULL, NULL};
|
||||||
void *reply = NULL;
|
void *reply = NULL;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user