From: Kulikov Vasiliy <segooon@gmail.com>
To: Dan Carpenter <error27@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 23:48:10 +0400 [thread overview]
Message-ID: <20100713194810.GA15596@albatros> (raw)
In-Reply-To: <20100713114347.GK5658@bicker>
On Tue, Jul 13, 2010 at 13:43 +0200, Dan Carpenter wrote:
> 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);
Heh, this function is surrounded with #ifdef MODULE #endif, so this typo
was not detected at my test nonmoduled compilation. Thanks.
Patch v2 is comming.
>
> 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 19:48 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
2010-07-13 19:48 ` Kulikov Vasiliy [this message]
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=20100713194810.GA15596@albatros \
--to=segooon@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=error27@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).