Commit 63e72e5
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: 2dcec7a ("sh: intc: set_irq_wake() support")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
Signed-off-by: John Paul Adrian Glaubitz <[email protected]>1 parent 3c891f7 commit 63e72e5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
| |||
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
0 commit comments