dmaengine: imx-sdma: Fix memory leak
The current descriptor is not on any list of the virtual DMA channel. Once sdma_terminate_all() is called when a descriptor is currently in flight then this one is forgotten to be freed. We have to call vchan_terminate_vdesc() on this descriptor to re-add it to the lists. Now that we also free the currently running descriptor we can (and actually have to) remove the current descriptor from its list also for the cyclic case. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Reviewed-by: NRobin Gong <yibin.gong@nxp.com> Tested-by: NRobin Gong <yibin.gong@nxp.com> Link: https://lore.kernel.org/r/20191216105328.15198-10-s.hauer@pengutronix.deSigned-off-by: NVinod Koul <vkoul@kernel.org>
Showing
想要评论请 注册 或 登录