for (i = 0; i < num; i++) { if (names[i]) kfree(names[i]); } 
for (i = 0; i < num; i++) kfree(names[i]); 
static int sel_make_bools(void){	int i, ret = 0;	ssize_t len;	struct dentry *dentry = NULL;	struct dentry *dir = bool_dir;	struct inode *inode = NULL;	struct inode_security_struct *isec;	char **names = NULL, *page;	int num;	int *values = NULL;	u32 sid;	/* remove any existing files */	if (bool_pending_values)		kfree(bool_pending_values);	sel_remove_bools(dir);	if (!(page = (char*)get_zeroed_page(GFP_KERNEL)))		return -ENOMEM;	ret = security_get_bools(&num, &names, &values);	if (ret != 0)		goto out;	for (i = 0; i < num; i++) {		dentry = d_alloc_name(dir, names[i]);		if (!dentry) {			ret = -ENOMEM;			goto err;		}		inode = sel_make_inode(dir->d_sb, S_IFREG | S_IRUGO | S_IWUSR);		if (!inode) {			ret = -ENOMEM;			goto err;		}		len = snprintf(page, PAGE_SIZE, "/%s/%s", BOOL_DIR_NAME, names[i]);		if (len < 0) {			ret = -EINVAL;			goto err;		} else if (len >= PAGE_SIZE) {			ret = -ENAMETOOLONG;			goto err;		}		isec = (struct inode_security_struct*)inode->i_security;		if ((ret = security_genfs_sid("selinuxfs", page, SECCLASS_FILE, &sid)))			goto err;		isec->sid = sid;		isec->initialized = 1;		inode->i_fop = &sel_bool_ops;		inode->i_ino = i + BOOL_INO_OFFSET;		d_add(dentry, inode);	}	bool_num = num;	bool_pending_values = values;out:	free_page((unsigned long)page);	if (names) {		for (i = 0; i < num; i++) {			if (names[i])				kfree(names[i]);		}		kfree(names);	}	return ret;err:	d_genocide(dir);	ret = -ENOMEM;	goto out;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9a5f04bf798254390f89445ecf0b6f4c70ddc1f8/selinuxfs.c/clean/security/selinux/selinuxfs.c