Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
			}
		}