diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-12-20 00:32:46 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-01-16 21:06:57 +0300 |
commit | 2052d032c06761330bca4944bb7858b00960e868 (patch) | |
tree | 56b99bc958b2155a94313cb4c4a5fa15c4edf4a8 /scripts/bpf_helpers_doc.py | |
parent | f5ac896b6a23eb46681cdbef440c1d991b04e519 (diff) | |
download | linux-2052d032c06761330bca4944bb7858b00960e868.tar.xz |
clocksource/drivers/bcm2835_timer: Fix memory leak of timer
Currently when setup_irq fails the error exit path will leak the
recently allocated timer structure. Originally the code would
throw a panic but a later commit changed the behaviour to return
via the err_iounmap path and hence we now have a memory leak. Fix
this by adding a err_timer_free error path that kfree's timer.
Addresses-Coverity: ("Resource Leak")
Fixes: 524a7f08983d ("clocksource/drivers/bcm2835_timer: Convert init function to return error")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191219213246.34437-1-colin.king@canonical.com
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions