diff options
-rw-r--r-- | io_uring/io_uring.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index d892b842b07c..e851c6855895 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -5896,10 +5896,12 @@ static int io_arm_poll_handler(struct io_kiocb *req) mask |= POLLOUT | POLLWRNORM; } - if (req->flags & REQ_F_POLLED) + if (req->flags & REQ_F_POLLED) { apoll = req->apoll; - else + kfree(apoll->double_poll); + } else { apoll = kmalloc(sizeof(*apoll), GFP_ATOMIC); + } if (unlikely(!apoll)) return IO_APOLL_ABORTED; apoll->double_poll = NULL; |