From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Mika Kuoppala <miku@iki.fi>,
"David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <shemminger@vyatta.com>,
Eric Dumazet <eric.dumazet@gmail.com>, Tejun Heo <tj@kernel.org>,
Jiri Pirko <jpirko@redhat.com>,
netdev@vger.kernel.org
Subject: [PATCH] eth16i: fix memory leak
Date: Tue, 13 Jul 2010 15:22:18 +0400 [thread overview]
Message-ID: <1279020138-9398-1-git-send-email-segooon@gmail.com> (raw)
Free allocated netdev if no probe is expected.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/net/eth16i.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c
index 874973f..2bdd394 100644
--- a/drivers/net/eth16i.c
+++ b/drivers/net/eth16i.c
@@ -1442,8 +1442,10 @@ int __init init_module(void)
dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]);
if(io[this_dev] == 0) {
- if(this_dev != 0) /* Only autoprobe 1st one */
+ if (this_dev != 0) { /* Only autoprobe 1st one */
+ free_netdev(def);
break;
+ }
printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n");
}
--
1.7.0.4
next reply other threads:[~2010-07-13 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 11:22 Kulikov Vasiliy [this message]
2010-07-13 11:43 ` [PATCH] eth16i: fix memory leak Dan Carpenter
2010-07-13 19:48 ` Kulikov Vasiliy
2010-07-13 19:49 ` [PATCH v2] " Kulikov Vasiliy
2010-07-15 0:57 ` 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=1279020138-9398-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jpirko@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=miku@iki.fi \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).