Re: (subset) [PATCH] remoteproc: Fix a memory leak in an error handling path in 'rproc_handle_vdev()'

From: Bjorn Andersson
Date: Fri Oct 15 2021 - 13:23:19 EST


On Sat, 4 Sep 2021 13:37:32 +0200, Christophe JAILLET wrote:
> If 'copy_dma_range_map() fails, the memory allocated for 'rvdev' will leak.
> Move the 'copy_dma_range_map()' call after the device registration so
> that 'rproc_rvdev_release()' can be called to free some resources.
>
> Also, branch to the error handling path if 'copy_dma_range_map()' instead
> of a direct return to avoid some other leaks.
>
> [...]

Applied, thanks!

[1/1] remoteproc: Fix a memory leak in an error handling path in 'rproc_handle_vdev()'
commit: 0374a4ea7269645c46c3eb288526ea072fa19e79

Best regards,
--
Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>