aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-10-24 04:19:36 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-10-24 04:19:36 -0400
commit47c564e10f219f867bdb49225972749a43485a47 (patch)
tree5e119e0f2e011f422d880d88d1adb2142e508bfc /security
parentc9c2009a4e915db17f32701d1f0535b400e61b58 (diff)
parentba9e358fd04190a59e605c2963a15e014139a707 (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'security')
-rw-r--r--security/selinux/selinuxfs.c4
-rw-r--r--security/selinux/ss/policydb.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 8eb140dd2e4b..a45cc971e735 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -879,7 +879,7 @@ static ssize_t sel_commit_bools_write(struct file *filep,
879 if (sscanf(page, "%d", &new_value) != 1) 879 if (sscanf(page, "%d", &new_value) != 1)
880 goto out; 880 goto out;
881 881
882 if (new_value) { 882 if (new_value && bool_pending_values) {
883 security_set_bools(bool_num, bool_pending_values); 883 security_set_bools(bool_num, bool_pending_values);
884 } 884 }
885 885
@@ -952,6 +952,7 @@ static int sel_make_bools(void)
952 952
953 /* remove any existing files */ 953 /* remove any existing files */
954 kfree(bool_pending_values); 954 kfree(bool_pending_values);
955 bool_pending_values = NULL;
955 956
956 sel_remove_bools(dir); 957 sel_remove_bools(dir);
957 958
@@ -1002,6 +1003,7 @@ out:
1002 } 1003 }
1003 return ret; 1004 return ret;
1004err: 1005err:
1006 kfree(values);
1005 d_genocide(dir); 1007 d_genocide(dir);
1006 ret = -ENOMEM; 1008 ret = -ENOMEM;
1007 goto out; 1009 goto out;
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 0a758323a9cf..8e6262d12aa9 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -650,8 +650,10 @@ void policydb_destroy(struct policydb *p)
650 } 650 }
651 if (lrt) kfree(lrt); 651 if (lrt) kfree(lrt);
652 652
653 for (i = 0; i < p->p_types.nprim; i++) 653 if (p->type_attr_map) {
654 ebitmap_destroy(&p->type_attr_map[i]); 654 for (i = 0; i < p->p_types.nprim; i++)
655 ebitmap_destroy(&p->type_attr_map[i]);
656 }
655 kfree(p->type_attr_map); 657 kfree(p->type_attr_map);
656 658
657 return; 659 return;