From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Yichen Xie <yxie@cs.stanford.edu>,
linux-kernel@vger.kernel.org, netdev@oss.sgi.com,
"David S. Miller" <davem@davemloft.net>,
kaber@trash.net
Subject: Re: memory leak in net/sched/ipt.c?
Date: Wed, 23 Mar 2005 14:23:32 +0100 [thread overview]
Message-ID: <20050323132332.GQ3086@postel.suug.ch> (raw)
In-Reply-To: <1111583497.1089.92.camel@jzny.localdomain>
* jamal <1111583497.1089.92.camel@jzny.localdomain> 2005-03-23 08:11
> On Wed, 2005-03-23 at 07:55, Thomas Graf wrote:
> > * jamal <1111581618.1088.72.camel@jzny.localdomain> 2005-03-23 07:40
>
> > > Just a small correction to patchlet:
> > > The second kfree should check for existence of t.
> >
> > t is either valid or NULL so it's not a problem, unless you want
> > to create janitor work of course. ;->
>
> if t is null you still goto rtattr_failure
> I have seen people put little comments of "kfree will work if you
> pass it NULL" - are you saying such assumptions exist all over
> net/sched?
kfree simply does nothing if it is given a null pointer so that
goto rtattr_failure for t == NULL is handled just fine without
a check. I will never get used to this behaviour and policy as
well though, it somewhat makes code less readable.
> didnt understand the janitor part.
It will probably be removed again by one of the regular 'remove
unnecessary pre kfree checks' patchsets.
next prev parent reply other threads:[~2005-03-23 13:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.61.0503230011090.4207@kaki.stanford.edu>
2005-03-23 11:30 ` memory leak in net/sched/ipt.c? Herbert Xu
2005-03-23 12:40 ` jamal
2005-03-23 12:55 ` Thomas Graf
2005-03-23 13:11 ` jamal
2005-03-23 13:23 ` Thomas Graf [this message]
2005-03-23 13:32 ` jamal
2005-03-23 13:40 ` Jan Engelhardt
2005-03-23 14:05 ` jamal
2005-03-23 14:12 ` jamal
2005-03-23 18:27 ` Yichen Xie
2005-03-23 20:37 ` Herbert Xu
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=20050323132332.GQ3086@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=yxie@cs.stanford.edu \
/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).