From: Dan Carpenter <error27@gmail.com>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org, 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: Re: [PATCH] eth16i: fix memory leak
Date: Tue, 13 Jul 2010 13:43:47 +0200 [thread overview]
Message-ID: <20100713114347.GK5658@bicker> (raw)
In-Reply-To: <1279020138-9398-1-git-send-email-segooon@gmail.com>
On Tue, Jul 13, 2010 at 03:22:18PM +0400, Kulikov Vasiliy wrote:
> 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);
^^^
free_netdev(dev);
regards,
dan carpenter
> break;
> + }
>
> printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n");
> }
> --
next prev parent reply other threads:[~2010-07-13 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 11:22 [PATCH] eth16i: fix memory leak Kulikov Vasiliy
2010-07-13 11:43 ` Dan Carpenter [this message]
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=20100713114347.GK5658@bicker \
--to=error27@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=segooon@gmail.com \
--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).