Skip to content

Commit

Permalink
BNX2: free temp_stats_blk on error path
Browse files Browse the repository at this point in the history
In bnx2_init_board, missing free temp_stats_blk on error path when
some operations do failed. Just add the 'kfree' operation.

Signed-off-by: Wang Weidong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
wangweidong authored and davem330 committed Oct 13, 2015
1 parent 76973dd commit 3703ebe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8476,6 +8476,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
pci_disable_device(pdev);

err_out:
kfree(bp->temp_stats_blk);

return rc;
}

Expand Down

0 comments on commit 3703ebe

Please sign in to comment.