Re: [PATCH v2] misc: fastrpc: Fix double free of 'buf' in error path

From: Srinivas Kandagatla
Date: Fri Aug 16 2024 - 04:42:31 EST



On Fri, 02 Jun 2023 04:36:02 -0700, Sukrut Bellary wrote:
> smatch warning:
> drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf'
>
> In fastrpc_req_mmap() error path, the fastrpc buffer is freed in
> fastrpc_req_munmap_impl() if unmap is successful.
>
> But in the end, there is an unconditional call to fastrpc_buf_free().
> So the above case triggers the double free of fastrpc buf.
>
> [...]

Applied, thanks!

[1/1] misc: fastrpc: Fix double free of 'buf' in error path
commit: b056e4e23acbbbf12fa011caa781f7cecbd5b311

Best regards,
--
Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>