Re: [PATCH] dma: qcom: gpi: Fix memory leak in gpi_peripheral_config()
From: Vinod Koul
Date: Tue Dec 23 2025 - 06:23:48 EST
On Wed, 29 Oct 2025 20:34:19 +0800, Miaoqian Lin wrote:
> Fix a memory leak in gpi_peripheral_config() where the original memory
> pointed to by gchan->config could be lost if krealloc() fails.
>
> The issue occurs when:
> 1. gchan->config points to previously allocated memory
> 2. krealloc() fails and returns NULL
> 3. The function directly assigns NULL to gchan->config, losing the
> reference to the original memory
> 4. The original memory becomes unreachable and cannot be freed
>
> [...]
Applied, thanks!
[1/1] dma: qcom: gpi: Fix memory leak in gpi_peripheral_config()
commit: 2387beefdb3284298e98369bb886584e3abae4ed
Best regards,
--
~Vinod