Commit 2f6d8fad authored by Geyslan G. Bem's avatar Geyslan G. Bem Committed by Vinod Koul

dma: edma.c: remove edma_desc leakage

Free memory allocated to edma_desc when failing to allocate slot.
Signed-off-by: default avatarGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 08d08bcd
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment