Skip to contentSkip to conversation

BNX2: free temp_stats_blk on error path

PATCH Applied Weidong Wang 2 participants 2 messages Oct 13, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/broadcom/bnx2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/broadcom/bnx2.c +2 -0
index 6259064..8fc3f3c 100644
@@ -8476,6 +8476,8 @@ err_out_disable:
 	pci_disable_device(pdev);
 
 err_out:
+	kfree(bp->temp_stats_blk);
+
 	return rc;
 }
 
Signature · 1 line
1.9.0