Skip to content

Commit

Permalink
dma: edma.c: remove edma_desc leakage
Browse files Browse the repository at this point in the history
Free memory allocated to edma_desc when failing to allocate slot.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Geyslan G. Bem authored and Vinod Koul committed Oct 11, 2013
1 parent 08d08bc commit 2f6d8fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
EDMA_SLOT_ANY);
if (echan->slot[i] < 0) {
dev_err(dev, "Failed to allocate slot\n");
kfree(edesc);
return NULL;
}
}
Expand Down

0 comments on commit 2f6d8fa

Please sign in to comment.