Skip to content
Commit 13770a71 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe
Browse files

io_uring: Fix NULL dereference in error in io_sqe_files_register()



If we hit a "goto out_free;" before the "ctx->file_data" pointer has
been assigned then it leads to a NULL derefence when we call:

	free_fixed_rsrc_data(ctx->file_data);

We can fix this by moving the assignment earlier.

Fixes: 1ad555c6 ("io_uring: create common fixed_rsrc_data allocation routines")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8b28fdf2
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