summaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2007-08-01 11:12:58 -0400
committerJames Morris <jmorris@namei.org>2007-08-02 11:52:23 -0400
commit088999e98b8caecd31adc3b62223a228555c5ab7 (patch)
treeee16fd7c6cdde90642550ee9937fafb96e979f67 /security/selinux
parent9534f71ca33e5a9de26dfd43c76af86e005005dd (diff)
downloadop-kernel-dev-088999e98b8caecd31adc3b62223a228555c5ab7.zip
op-kernel-dev-088999e98b8caecd31adc3b62223a228555c5ab7.tar.gz
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 <paul.moore@hp.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 0fac682..6237933 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
OpenPOWER on IntegriCloud