[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <561C66DF.2080302@huawei.com>
Date: Tue, 13 Oct 2015 10:05:19 +0800
From: Weidong Wang <wangweidong1@...wei.com>
To: David Miller <davem@...emloft.net>, <manish.chopra@...gic.com>,
<Dept-HSGLinuxNICDev@...gic.com>, <sony.chacko@...gic.com>
CC: <netdev@...r.kernel.org>
Subject: [PATCH net-next] 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@...wei.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists