BNX2: free temp_stats_blk on error path
authorwangweidong <wangweidong1@huawei.com>
Tue, 13 Oct 2015 02:05:19 +0000 (10:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2015 02:33:46 +0000 (19:33 -0700)
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>
drivers/net/ethernet/broadcom/bnx2.c

index 62590641897d59104f23b10c704e5bd44c6c9364..8fc3f3c137f87d2ac4fb0fc867acd50def69a03f 100644 (file)
@@ -8476,6 +8476,8 @@ err_out_disable:
        pci_disable_device(pdev);
 
 err_out:
+       kfree(bp->temp_stats_blk);
+
        return rc;
 }