firmware: raspberrypi: fix possible memory leak in rpi_firmware_probe()
commit 7b511616 upstream. In rpi_firmware_probe(), if mbox_request_channel() fails, the 'fw' will not be freed through rpi_firmware_delete(), fix this leak by calling kfree() in the error path. Fixes: 1e7c5735 ("firmware: raspberrypi: Keep count of all consumers") Signed-off-by:Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20221117070636.3849773-1-yangyingliang@huawei.com Acked-by:
Joel Savitz <jsavitz@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment