From: Weidong Wang <wangweidong1@huawei.com>
To: David Miller <davem@davemloft.net>, <manish.chopra@qlogic.com>,
<Dept-HSGLinuxNICDev@qlogic.com>, <sony.chacko@qlogic.com>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH net-next] BNX2: free temp_stats_blk on error path
Date: Tue, 13 Oct 2015 10:05:19 +0800 [thread overview]
Message-ID: <561C66DF.2080302@huawei.com> (raw)
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
next reply other threads:[~2015-10-13 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 2:05 Weidong Wang [this message]
2015-10-13 2:34 ` [PATCH net-next] BNX2: free temp_stats_blk on error path David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561C66DF.2080302@huawei.com \
--to=wangweidong1@huawei.com \
--cc=Dept-HSGLinuxNICDev@qlogic.com \
--cc=davem@davemloft.net \
--cc=manish.chopra@qlogic.com \
--cc=netdev@vger.kernel.org \
--cc=sony.chacko@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.