Commit 5f633ac4 authored by Mark Nunberg's avatar Mark Nunberg
Browse files

fix potential uninitialized read

If callback was set before scheduleTimer was set (i..e before one of the
attach()) calls.
parent 0bc2356e
......@@ -144,6 +144,7 @@ static redisAsyncContext *redisAsyncInitialize(redisContext *c) {
ac->ev.addWrite = NULL;
ac->ev.delWrite = NULL;
ac->ev.cleanup = NULL;
ac->ev.scheduleTimer = NULL;
ac->onConnect = NULL;
ac->onDisconnect = NULL;
......@@ -844,4 +845,4 @@ void redisAsyncSetTimeout(redisAsyncContext *ac, struct timeval tv) {
}
*ac->c.timeout = tv;
}
\ No newline at end of file
}
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