Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: ethernet: stmicro: stmmac: fix possible memory leak in __stmmac_…
…open Fix a possible memory leak in __stmmac_open when stmmac_init_phy fails. It's also needed to free everything allocated by stmmac_setup_dma_desc and not just the dma_conf struct. Drop free_dma_desc_resources from __stmmac_open and correctly call free_dma_desc_resources on each user of __stmmac_open on error. Reported-by: Jose Abreu <[email protected]> Fixes: ba39b34 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open") Signed-off-by: Christian Marangi <[email protected]> Cc: [email protected] Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jose Abreu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information