Skip to content
Unverified Commit 14e13b1c authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

regmap-irq: Fix dereference of a potentially null d->virt_buf



The clean up of struct d can potentiallly index into a null array
d->virt_buf causing errorenous pointer dereferencing issues on
kfree calls.  Fix this by adding a null check on d->virt_buf before
attempting to traverse the array to kfree the objects.

Addresses-Coverity: ("Dereference after null check")
Fixes: 4c501445 ("regmap-irq: Introduce virtual regs to handle more config regs")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210406164002.430221-1-colin.king@canonical.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 394409aa
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