Skip to content
Snippets Groups Projects
Commit 63e72e55 authored by Dan Carpenter's avatar Dan Carpenter Committed by John Paul Adrian Glaubitz
Browse files

sh: intc: Fix use-after-free bug in register_intc_controller()


In the error handling for this function, d is freed without ever
removing it from intc_list which would lead to a use after free.
To fix this, let's only add it to the list after everything has
succeeded.

Fixes: 2dcec7a9 ("sh: intc: set_irq_wake() support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
parent 3c891f7c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment