diff options
author | Matt Stancliff <matt@genges.com> | 2014-04-07 11:32:16 -0400 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2014-04-08 19:37:45 -0400 |
commit | 61eeedbe77a7fef16e44b6fe215a689b7911044e (patch) | |
tree | 65bbb2380f7cd141bdbfe1b401b03a40a286d5aa | |
parent | e35266e68fa2f9a292639eb7e499eace226101d0 (diff) |
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
-rw-r--r-- | async.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |