OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.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
|
history
diff --git
a/drivers/dma/edma.c
b/drivers/dma/edma.c
index
3519111
..
134fa96
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;