]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 25 Sep 2019 19:05:09 +0000 (14:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 18:12:03 +0000 (20:12 +0200)
commit923083e3c6955f4c2112b5b6d23d4ae23fb666e7
treef5ac35b09a619450d16779f24e66bbe8f3cfb427
parent956124b732825b72a28ffeea85a48e3895e6db67
nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs

In nfp_flower_spawn_vnic_reprs in the loop if initialization or the
allocations fail memory is leaked. Appropriate releases are added.

Fixes: 8ccc0516eb17 ("nfp: flower: add per repr private data for LAG offload")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.c