Skip to content

Commit d3c4fa7

Browse files
committed
Guard against NULL tiocb in lio event handler
Signed-off-by: Mark Syms <[email protected]>
1 parent ce08eff commit d3c4fa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/libaio-backend.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ libaio_backend_lio_event(event_id_t id, char mode, void *private)
425425
for (i = split, ep = lio->aio_events; i-- > 0; ep++) {
426426
iocb = ep->obj;
427427
tiocb = iocb->data;
428-
complete_tiocb(queue, tiocb, ep->res);
428+
if (tiocb)
429+
complete_tiocb(queue, tiocb, ep->res);
429430
}
430431

431432
queue_deferred_tiocbs(queue);

0 commit comments

Comments
 (0)