lkml.org 
[lkml]   [2005]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] don't do pointless NULL checks and casts before kfree() in security/
From
Date
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 pointless checks for NULL and needless mucking
> about with the pointer types before kfree() for all files in security/*
> where I could locate such code.
>
> The following files are modified by this patch:
> security/keys/key.c
> security/keys/user_defined.c
> security/selinux/hooks.c
> security/selinux/selinuxfs.c
> security/selinux/ss/conditional.c
> security/selinux/ss/policydb.c
> security/selinux/ss/services.c
>
> (please keep me on CC if you reply)
>
>
> Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

The diffs to selinux look fine to me, and the resulting kernel seems to
be operating without problem. Feel free to send along to Andrew Morton.

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.295 / U:2.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site