diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-25 14:58:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 16:25:00 -0700 |
commit | 9a5f04bf798254390f89445ecf0b6f4c70ddc1f8 (patch) | |
tree | ed9aa17d9d980f3f013ccc84e12135c65b51757d /security/selinux/selinuxfs.c | |
parent | a2ba192c96d12447472e105890a9cd1b97952747 (diff) | |
download | linux-9a5f04bf798254390f89445ecf0b6f4c70ddc1f8.tar.gz linux-9a5f04bf798254390f89445ecf0b6f4c70ddc1f8.tar.bz2 linux-9a5f04bf798254390f89445ecf0b6f4c70ddc1f8.zip |
[PATCH] selinux: kfree cleanup
kfree(NULL) is legal.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r-- | security/selinux/selinuxfs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 07221568b505..8eb140dd2e4b 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -951,8 +951,7 @@ static int sel_make_bools(void) u32 sid; /* remove any existing files */ - if (bool_pending_values) - kfree(bool_pending_values); + kfree(bool_pending_values); sel_remove_bools(dir); @@ -997,10 +996,8 @@ static int sel_make_bools(void) out: free_page((unsigned long)page); if (names) { - for (i = 0; i < num; i++) { - if (names[i]) - kfree(names[i]); - } + for (i = 0; i < num; i++) + kfree(names[i]); kfree(names); } return ret; |