projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18ebd56
)
dma: edma: Fix memory leak
author
Valentin Ilie
<valentin.ilie@gmail.com>
Thu, 24 Oct 2013 13:14:22 +0000
(16:14 +0300)
committer
Vinod Koul
<vinod.koul@intel.com>
Thu, 24 Oct 2013 16:46:15 +0000
(22:16 +0530)
When it fails to allocate a slot, edesc should be free'd before return;
Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/edma.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/dma/edma.c
b/drivers/dma/edma.c
index 3519111c566b8a3bc9a43b8b89bc2b866c3d833e..134fa96de1b365a3feb8e557cfefc7868c80e272 100644
(file)
--- a/
drivers/dma/edma.c
+++ b/
drivers/dma/edma.c
@@
-305,6
+305,7
@@
static struct dma_async_tx_descriptor *edma_prep_slave_sg(
edma_alloc_slot(EDMA_CTLR(echan->ch_num),
EDMA_SLOT_ANY);
if (echan->slot[i] < 0) {
+ kfree(edesc);
dev_err(dev, "Failed to allocate slot\n");
kfree(edesc);
return NULL;