public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Andy Chou <acc@CS.Stanford.EDU>,
	Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [CHECKER] 6 memory leaks
Date: Sat, 19 Apr 2003 02:55:26 -0700	[thread overview]
Message-ID: <20030419095526.GE12469@holomorphy.com> (raw)
In-Reply-To: <20030419094445.GA7283@actcom.co.il>

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?


-- wli

  reply	other threads:[~2003-04-19  9:43 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 [this message]
2003-04-19 10:02     ` Muli Ben-Yehuda
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=20030419095526.GE12469@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=acc@CS.Stanford.EDU \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mulix@mulix.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