diff options
author | Hui Wang <[email protected]> | 2022-11-30 17:08:00 +0800 |
---|---|---|
committer | Vinod Koul <[email protected]> | 2023-01-18 17:44:29 +0530 |
commit | 1417f59ac0b02130ee56c0c50794b9b257be3d17 (patch) | |
tree | 3c6bf7751d3970818c9fef4768e9a48cab31f46d /lib/memory-notifier-error-inject.c | |
parent | f3dc1b3b4750851a94212dba249703dd0e50bb20 (diff) |
dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
If the function sdma_load_context() fails, the sdma_desc will be
freed, but the allocated desc->bd is forgot to be freed.
We already met the sdma_load_context() failure case and the log as
below:
[ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
...
In this case, the desc->bd will not be freed without this change.
Signed-off-by: Hui Wang <[email protected]>
Reviewed-by: Sascha Hauer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions