From: Paul Moore Date: Wed, 1 Aug 2007 15:12:58 +0000 (-0400) Subject: SELinux: remove redundant pointer checks before calling kfree() X-Git-Tag: v2.6.23-rc2~14^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=088999e98b8caecd31adc3b62223a228555c5ab7;p=~shefty%2Frdma-dev.git SELinux: remove redundant pointer checks before calling kfree() We don't need to check for NULL pointers before calling kfree(). Signed-off-by: Paul Moore Acked-by: Stephen Smalley Signed-off-by: James Morris --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 0fac6829c63..6237933f7d8 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -4658,8 +4658,7 @@ static int selinux_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) static void selinux_release_secctx(char *secdata, u32 seclen) { - if (secdata) - kfree(secdata); + kfree(secdata); } #ifdef CONFIG_KEYS