Initialize ki to p->p_aioinfo after we know it's going to be referencing
a valid kaioinfo structure. This avoids a potential NULL pointer dereference. Found with: Coverity Prevent(tm) MFC after: 2 weeks
This commit is contained in:
parent
2166476ae9
commit
8213baf002
@ -2318,9 +2318,9 @@ aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap)
|
||||
timo = tvtohz(&atv);
|
||||
}
|
||||
|
||||
ki = p->p_aioinfo;
|
||||
if (ki == NULL)
|
||||
if (p->p_aioinfo == NULL)
|
||||
aio_init_aioinfo(p);
|
||||
ki = p->p_aioinfo;
|
||||
|
||||
for (;;) {
|
||||
PROC_LOCK(p);
|
||||
|
Loading…
Reference in New Issue
Block a user