diff options
author | Bartosz Golaszewski <[email protected]> | 2024-07-12 21:40:04 +0200 |
---|---|---|
committer | Bartosz Golaszewski <[email protected]> | 2024-07-17 16:30:50 +0200 |
commit | a19ce320c379e0519b68178c596e43d1d5dda03b (patch) | |
tree | 6ce40d4f3653caf10eab323dcb04be4bcd09b48e /lib/test_fortify/write_overflow-strcpy.c | |
parent | e763c9ec71dd462337d0b671ec5014b737c5342e (diff) |
power: sequencing: fix an invalid pointer dereference in error path
We may end up calling pwrseq_target_free() on a partially initialized
target object whose unit is either NULL or an ERR_PTR(). Avoid
dereferencing invalid memory by adding an appropriate check to
pwrseq_target_free().
Fixes: 249ebf3f65f8 ("power: sequencing: implement the pwrseq core")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/linux-pm/[email protected]/
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strcpy.c')
0 files changed, 0 insertions, 0 deletions