Andrew, as pr Stephen's comment below I'm sending you a diff that's a
subset of the kfree() fixes i did for security/ earlier. The patch below
contains only the bits from security/selinux/ that Stephen ACK'ed -
re-diff'ed against 2.6.12-rc1-mm1.
Please consider applying.
On Tue, 22 Mar 2005,
On Tue, 22 Mar 2005, David Howells wrote:
>
> Jesper Juhl <[EMAIL PROTECTED]> wrote:
>
> > --- linux-2.6.11-mm4-orig/security/keys/key.c 2005-03-16
> > 15:45:42.0 +0100
> > +++ linux-2.6.11-mm4/security/keys/key.c2005-03-20 12:40:19.0
> > +0100
> > ...
> > - if
Jesper Juhl <[EMAIL PROTECTED]> wrote:
> --- linux-2.6.11-mm4-orig/security/keys/key.c 2005-03-16 15:45:42.0
> +0100
> +++ linux-2.6.11-mm4/security/keys/key.c 2005-03-20 12:40:19.0
> +0100
> ...
> - if (candidate)
> - kfree(candidate);
> +
On Sun, 2005-03-20 at 13:29 +0100, Jesper Juhl wrote:
> kfree() handles NULL pointers, so checking a pointer for NULL before
> calling kfree() on it is pointless. kfree() takes a void* argument and
> changing the type of a pointer before kfree()'ing it is equally pointless.
> This patch removes
On Sun, 2005-03-20 at 13:29 +0100, Jesper Juhl wrote:
kfree() handles NULL pointers, so checking a pointer for NULL before
calling kfree() on it is pointless. kfree() takes a void* argument and
changing the type of a pointer before kfree()'ing it is equally pointless.
This patch removes the
Jesper Juhl [EMAIL PROTECTED] wrote:
--- linux-2.6.11-mm4-orig/security/keys/key.c 2005-03-16 15:45:42.0
+0100
+++ linux-2.6.11-mm4/security/keys/key.c 2005-03-20 12:40:19.0
+0100
...
- if (candidate)
- kfree(candidate);
+ kfree(candidate);
On Tue, 22 Mar 2005, David Howells wrote:
Jesper Juhl [EMAIL PROTECTED] wrote:
--- linux-2.6.11-mm4-orig/security/keys/key.c 2005-03-16
15:45:42.0 +0100
+++ linux-2.6.11-mm4/security/keys/key.c2005-03-20 12:40:19.0
+0100
...
- if (candidate)
-
Andrew, as pr Stephen's comment below I'm sending you a diff that's a
subset of the kfree() fixes i did for security/ earlier. The patch below
contains only the bits from security/selinux/ that Stephen ACK'ed -
re-diff'ed against 2.6.12-rc1-mm1.
Please consider applying.
On Tue, 22 Mar 2005,
Hi Jesper,
> > > the short version also have the real bennefits of generating
> > > shorter and faster code as well as being shorter "on-screen".
> >
> > Faster code? I'd have thought avoiding the function call outweighed
> > the overhead of checking before calling.
>
> I haven't actually
Hi Jesper,
the short version also have the real bennefits of generating
shorter and faster code as well as being shorter on-screen.
Faster code? I'd have thought avoiding the function call outweighed
the overhead of checking before calling.
I haven't actually measured it, but
On Sun, 20 Mar 2005, Ralph Corderoy wrote:
>
> > and if there are places where it's important to remember that the
> > pointer might be NULL, then a simple comment would do, wouldn't it?
> >
> > kfree(foo->bar);/* kfree(NULL) is valid */
>
> I'd rather be without the same comment
In article <[EMAIL PROTECTED]> (at Sun, 20 Mar 2005 13:31:43 +), Ralph
Corderoy <[EMAIL PROTECTED]> says:
> > the short version also have the real bennefits of generating shorter
> > and faster code as well as being shorter "on-screen".
>
> Faster code? I'd have thought avoiding the
Hi Jesper,
> > 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/[EMAIL
> > PROTECTED]
> >
>
> I agree that
>
> if
On Sun, 20 Mar 2005, Ralph Corderoy wrote:
>
> 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.
>
Ralph Corderoy <[EMAIL PROTECTED]> wrote:
> 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.
If you
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.
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.
Ralph Corderoy [EMAIL PROTECTED] wrote:
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.
If you want to
On Sun, 20 Mar 2005, Ralph Corderoy wrote:
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.
Hi Jesper,
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/[EMAIL
PROTECTED]
I agree that
if (foo-bar) {
In article [EMAIL PROTECTED] (at Sun, 20 Mar 2005 13:31:43 +), Ralph
Corderoy [EMAIL PROTECTED] says:
the short version also have the real bennefits of generating shorter
and faster code as well as being shorter on-screen.
Faster code? I'd have thought avoiding the function call
On Sun, 20 Mar 2005, Ralph Corderoy wrote:
and if there are places where it's important to remember that the
pointer might be NULL, then a simple comment would do, wouldn't it?
kfree(foo-bar);/* kfree(NULL) is valid */
I'd rather be without the same comment littering the
22 matches
Mail list logo