All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@mulix.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	irda-users@lists.sourceforge.net
Subject: Re: [CHECKER] 6 memory leaks
Date: Sat, 19 Apr 2003 13:02:08 +0300	[thread overview]
Message-ID: <20030419100208.GA7625@actcom.co.il> (raw)
In-Reply-To: <20030419095526.GE12469@holomorphy.com>

[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]

On Sat, Apr 19, 2003 at 02:55:26AM -0700, William Lee Irwin III wrote:
> On Sat, Apr 19, 2003 at 12:44:45PM +0300, Muli Ben-Yehuda wrote:
> > Index: net/irda/irttp.c
> > ===================================================================
> > RCS file: /home/cvs/linux-2.5/net/irda/irttp.c,v
> > retrieving revision 1.12
> > diff -u -r1.12 irttp.c
> > --- net/irda/irttp.c	25 Feb 2003 05:02:46 -0000	1.12
> > +++ net/irda/irttp.c	19 Apr 2003 08:50:00 -0000
> > @@ -263,7 +263,7 @@
> >  
> >  	IRDA_DEBUG(2, "%s(), rx_sdu_size=%d\n",  __FUNCTION__,
> >  		   self->rx_sdu_size);
> > -	ASSERT(n <= self->rx_sdu_size, return NULL;);
> > +	ASSERT(n <= self->rx_sdu_size, {dev_kfree_skb(skb); return NULL;});
> >  
> >  	/* Set the new length */
> >  	skb_trim(skb, n);
> 
> I'm in terror. ASSERT()? return NULL in a macro argument?
> Any chance of cleaning that up a bit while you're at it?

I'm afraid it's rather wide-spread... 

mulix@granada:~/kernel/cvs/linux-2.5$ grep ASSERT net/irda/*.c | grep return | wc -l
    511

I'm willing to do the grunt work of converting it, if it's ok with the
IRDA maintainers. 
-- 
Muli Ben-Yehuda
http://www.mulix.org


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-04-19  9:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-19  2:50 [CHECKER] 6 memory leaks Andy Chou
2003-04-19  9:44 ` Muli Ben-Yehuda
2003-04-19  9:55   ` William Lee Irwin III
2003-04-19 10:02     ` Muli Ben-Yehuda [this message]
2003-04-19 10:13       ` William Lee Irwin III
2003-04-19 12:08   ` James Morris
2003-04-19 12:28     ` Muli Ben-Yehuda
  -- strict thread matches above, loose matches on Subject: below --
2003-04-21 20:27 Jean Tourrilhes
2003-04-21 20:53 ` William Lee Irwin III

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=20030419100208.GA7625@actcom.co.il \
    --to=mulix@mulix.org \
    --cc=irda-users@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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.