X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=security%2Fselinux%2Fselinuxfs.c;h=a45cc971e73588bdc0c2e5a74774736c854f713d;hb=de5144164f6242ccfa8c9b64eec570564f5eaf14;hp=8eb140dd2e4b3bda4906f717491bb740b4450e50;hpb=3e0777b8fa96f7073ed5d13d3bc1d573b766bef9;p=linux-2.6-omap-h63xx.git diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 8eb140dd2e4..a45cc971e73 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, if (sscanf(page, "%d", &new_value) != 1) goto out; - if (new_value) { + if (new_value && bool_pending_values) { security_set_bools(bool_num, bool_pending_values); } @@ -952,6 +952,7 @@ static int sel_make_bools(void) /* remove any existing files */ kfree(bool_pending_values); + bool_pending_values = NULL; sel_remove_bools(dir); @@ -1002,6 +1003,7 @@ out: } return ret; err: + kfree(values); d_genocide(dir); ret = -ENOMEM; goto out;