提交 2f6d8fad 编写于 作者: G Geyslan G. Bem 提交者: Vinod Koul

dma: edma.c: remove edma_desc leakage

Free memory allocated to edma_desc when failing to allocate slot.
Signed-off-by: NGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册