aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorChristian Marangi <[email protected]>2023-06-14 11:17:14 +0200
committerJakub Kicinski <[email protected]>2023-06-15 15:02:04 -0700
commit30134b7c47bd28fdb4db4d12aef824e0579cfee4 (patch)
treeafc5731b0e6d2eae70ef4bb0748e87c4c42120f2 /drivers/net/ethernet/intel/ice/ice_main.c
parent44194cb1b6045dea33ae9a0d54fb7e7cd93a2e09 (diff)
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: ba39b344e924 ("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]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
0 files changed, 0 insertions, 0 deletions