diff options
author | Abdun Nihaal <abdun.nihaal@gmail.com> | 2025-06-29 20:10:10 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-30 19:16:07 +0200 |
commit | 505bffe2123323af1e9122583aafeb3a0700bf9c (patch) | |
tree | 876dbee9b39e3ce39d3cca41e47155ec70981766 /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 49bba7ef33dca745978bb59c3a06e2da46c362b6 (diff) |
staging: fbtft: fix potential memory leak in fbtft_framebuffer_alloc()
After commit 56c134f7f1b5 ("fbdev: Track deferred-I/O pages in pageref
struct"), fb_deferred_io_init() allocates memory for info->pagerefs as
well as return an error code on failure. However the error code is
ignored here and the memory allocated could leak because of not calling
fb_deferred_io_cleanup() on the error path.
Fix them by adding the cleanup function on the error path, and handling
the error code returned by fb_deferred_io_init().
Fixes: 56c134f7f1b5 ("fbdev: Track deferred-I/O pages in pageref struct")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/fd2be49cfef72799f17a96d01a4c6b92770cda7d.1751207100.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions