From: wangweidong Date: Tue, 13 Oct 2015 02:05:19 +0000 (+0800) Subject: BNX2: free temp_stats_blk on error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3703ebe4035044dea3749fcdd1c0849937147959;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- 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; }