Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dma: edma: Fix memory leak

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>

authored by

Valentin Ilie and committed by
Vinod Koul
4b6271a6 18ebd564

+1
+1
drivers/dma/edma.c
··· 305 305 edma_alloc_slot(EDMA_CTLR(echan->ch_num), 306 306 EDMA_SLOT_ANY); 307 307 if (echan->slot[i] < 0) { 308 + kfree(edesc); 308 309 dev_err(dev, "Failed to allocate slot\n"); 309 310 kfree(edesc); 310 311 return NULL;