mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <juhl-lkml@dif.dk>
To: Andrew Morton <akpm@osdl.org>
Cc: Jesper Juhl <juhl-lkml@dif.dk>,
	linux-kernel@vger.kernel.org, eokerson@quicknet.net,
	joe@perches.com
Subject: Re: [PATCH] kfree cleanups (remove redundant NULL checks) in drivers/telephony/ (actually ixj.c only)
Date: Sat, 7 May 2005 04:09:38 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.62.0505070407260.2384@dragon.hyggekrogen.localhost> (raw)
In-Reply-To: <20050506190212.0d6a5300.akpm@osdl.org>

On Fri, 6 May 2005, Andrew Morton wrote:

> 
> This patch adds behavioural changes:
> 
> -		if (j->read_buffer) {
> -			kfree(j->read_buffer);
> -			j->read_buffer = NULL;
> -			j->read_buffer_size = 0;
> -		}
> +		j->read_buffer = NULL;
> +		j->read_buffer_size = 0;
> 
> Now we'll zero ->read_buffer_size even if ->read_buffer was already NULL.
> 
> It's hard to believe that this could cause any problems, but please check
> that.
> 
When I initially read the code I didn't see any harm that could be done by 
that, but I'll take a second more careful look and report back - I'm 
pretty sure it's safe though.
I'll do this tomorrow since I'm off to catch some sleep now.

-- 
Jesper


  reply	other threads:[~2005-05-07  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-07  0:58 Jesper Juhl
2005-05-07  1:54 ` Jesper Juhl
2005-05-07  2:02   ` Andrew Morton
2005-05-07  2:09     ` Jesper Juhl [this message]
2005-05-08 22:03       ` Jesper Juhl

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=Pine.LNX.4.62.0505070407260.2384@dragon.hyggekrogen.localhost \
    --to=juhl-lkml@dif.dk \
    --cc=akpm@osdl.org \
    --cc=eokerson@quicknet.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®