dma: edma.c: remove edma_desc leakage
PATCH 1/1 dma: edma.c: remove edma_desc leakage
Free memory allocated to edma_desc when failing to allocate slot.
Signed-off-by Geyslan G. Bem <[email protected]>
--- drivers/dma/edma.c | 1 + 1 file changed, 1 insertion(+)
drivers/dma/edma.c +1 -0
@@ -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 ; } }
Signature · 1 line
1.8.4
Quoted 3 lines · Geyslan G. Bem
Free memory allocated to
edma_descwhen failing to allocate slot.Signed-off-by Geyslan G. Bem <[email protected]>
Applied thanks
~Vinod
Quoted 19 lines
--- drivers/dma/edma.c | 1 + 1 file changed, 1 insertion(+)drivers/dma/edma.c +1
-0@@ -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 ; } }Signature · 1 line
1.8.4