Subject: [PATCH net-next] BNX2: free temp_stats_blk on error path

From: Weidong Wang <[email-masked]>
Date: Tue, 13 Oct 2015 10:05:19 +0800

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-masked]>
---
 drivers/net/ethernet/broadcom/bnx2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 6259064..8fc3f3c 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;
 }

-- 
1.9.0