summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2015-10-13 10:05:19 +0800
committerDavid S. Miller <davem@davemloft.net>2015-10-12 19:33:46 -0700
commit3703ebe4035044dea3749fcdd1c0849937147959 (patch)
tree6d67f8fb6feafaa9443287d7c5faa8679e336185 /drivers/net/ethernet/broadcom
parent76973dd79fd52f187ba3df018bca65792a3d942d (diff)
downloadlinux-3703ebe4035044dea3749fcdd1c0849937147959.tar.bz2
BNX2: free temp_stats_blk on error path
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 <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 62590641897d..8fc3f3c137f8 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -8476,6 +8476,8 @@ err_out_disable:
pci_disable_device(pdev);
err_out:
+ kfree(bp->temp_stats_blk);
+
return rc;
}