Skip to content

Commit

Permalink
nfp: fix memory leak on FW load error
Browse files Browse the repository at this point in the history
Free management FW info when app FW load failed.

Fixes: eefbde7 ("nfp: add hwmon support")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed May 31, 2017
1 parent c66a9cf commit 47eaa23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/netronome/nfp/nfp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 47eaa23

Please sign in to comment.