All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] BNX2: free temp_stats_blk on error path
@ 2015-10-13  2:05 Weidong Wang
  2015-10-13  2:34 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Weidong Wang @ 2015-10-13  2:05 UTC (permalink / raw)
  To: David Miller, manish.chopra, Dept-HSGLinuxNICDev, sony.chacko; +Cc: netdev

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>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] BNX2: free temp_stats_blk on error path
  2015-10-13  2:05 [PATCH net-next] BNX2: free temp_stats_blk on error path Weidong Wang
@ 2015-10-13  2:34 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-10-13  2:34 UTC (permalink / raw)
  To: wangweidong1; +Cc: manish.chopra, Dept-HSGLinuxNICDev, sony.chacko, netdev

From: Weidong Wang <wangweidong1@huawei.com>
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 <wangweidong1@huawei.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-13  2:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13  2:05 [PATCH net-next] BNX2: free temp_stats_blk on error path Weidong Wang
2015-10-13  2:34 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.