diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-05-31 18:06:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-01 00:58:13 +0300 |
commit | 47eaa23b4c27d735cb797be71c711a99f99e9ff6 (patch) | |
tree | b938a4f6c4eaaa6eaf9ee3088aaa4742a70489bc /drivers/net/ethernet/netronome/nfp/nfp_main.c | |
parent | c66a9cf408037781fc1984bc60785049b453d8a4 (diff) | |
download | linux-47eaa23b4c27d735cb797be71c711a99f99e9ff6.tar.xz |
nfp: fix memory leak on FW load error
Free management FW info when app FW load failed.
Fixes: eefbde7e1002 ("nfp: add hwmon support")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_main.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c index 68cd34d5a9fb..0c2e64d217b5 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -279,6 +279,7 @@ static int nfp_nsp_init(struct pci_dev *pdev, struct nfp_pf *pf) err = nfp_fw_load(pdev, pf, nsp); if (err < 0) { + kfree(pf->nspi); kfree(pf->eth_tbl); dev_err(&pdev->dev, "Failed to load FW\n"); goto exit_close_nsp; |