All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralph Corderoy <ralph@inputplus.co.uk>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] don't do pointless NULL checks and casts before kfree() in security/
Date: Sun, 20 Mar 2005 12:50:10 +0000	[thread overview]
Message-ID: <200503201250.j2KCoAq11871@blake.inputplus.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.62.0503201316270.2501@dragon.hyggekrogen.localhost>


Hi Jesper,

> kfree() handles NULL pointers, so checking a pointer for NULL before 
> calling kfree() on it is pointless.

Not necessarily.  It helps tell the reader that the pointer may be NULL
at that point.  This has come up before.

    http://groups-beta.google.com/group/linux.kernel/browse_thread/thread/bd3d6e5a29e43c73/7b43819f874295e8?q=ralph@inputplus.co.uk+persuade+lkml#7b43819f874295e8

Cheers,


Ralph.


  reply	other threads:[~2005-03-20 12:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-20 12:29 [PATCH] don't do pointless NULL checks and casts before kfree() in security/ Jesper Juhl
2005-03-20 12:50 ` Ralph Corderoy [this message]
2005-03-20 13:18   ` Jesper Juhl
2005-03-20 13:31     ` Ralph Corderoy
2005-03-20 14:04       ` YOSHIFUJI Hideaki / 吉藤英明
2005-03-20 14:39       ` Jesper Juhl
2005-03-21 10:17         ` Ralph Corderoy
2005-03-22 15:00 ` Stephen Smalley
2005-03-22 15:00   ` Stephen Smalley
2005-03-22 20:57   ` [PATCH] don't do pointless NULL checks and casts before kfree() in security/selinux/ Jesper Juhl
2005-03-22 15:34 ` [PATCH] don't do pointless NULL checks and casts before kfree() in security/ David Howells
2005-03-22 20:46   ` Jesper Juhl
     [not found] <fa.p25ihnj.4026at@ifi.uio.no>
     [not found] ` <fa.iqmuavi.o6kfai@ifi.uio.no>
2005-03-20 13:18   ` Bodo Eggert

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=200503201250.j2KCoAq11871@blake.inputplus.co.uk \
    --to=ralph@inputplus.co.uk \
    --cc=juhl-lkml@dif.dk \
    --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 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.