aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-03-27 13:35:53 +0200
committerVinod Koul <vinod.koul@intel.com>2015-03-30 23:17:08 +0530
commitf93178291712772983845700b12fc1c8b32f2eb1 (patch)
treeb8751dda152f47d2048ce7d3f1998281c0d21127
parent02d88b735f5a60f04dbf6d051b76e1877a0d0844 (diff)
downloadibft-f93178291712772983845700b12fc1c8b32f2eb1.tar.gz
dmaengine: bcm2835-dma: Fix memory leak when stopping a running transfer
The vd->node is removed from the lists when the transfer started so the vchan_get_all_descriptors() will not find it. This results memory leak. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/bcm2835-dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index 0723096fb50ac..c92d6a70ccf30 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -475,6 +475,7 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan)
* c->desc is NULL and exit.)
*/
if (c->desc) {
+ bcm2835_dma_desc_free(&c->desc->vd);
c->desc = NULL;
bcm2835_dma_abort(c->chan_base);