mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-09 08:43:46 +00:00
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>
This commit is contained in:
parent
02d88b735f
commit
f931782917
1 changed files with 1 additions and 0 deletions
|
@ -475,6 +475,7 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan)
|
||||||
* c->desc is NULL and exit.)
|
* c->desc is NULL and exit.)
|
||||||
*/
|
*/
|
||||||
if (c->desc) {
|
if (c->desc) {
|
||||||
|
bcm2835_dma_desc_free(&c->desc->vd);
|
||||||
c->desc = NULL;
|
c->desc = NULL;
|
||||||
bcm2835_dma_abort(c->chan_base);
|
bcm2835_dma_abort(c->chan_base);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue