summaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-11-26 17:32:55 -0500
committerPaul Moore <pmoore@redhat.com>2013-11-26 17:32:55 -0500
commitdd0a11815a339d6deeea8357574f8126a8404c92 (patch)
treec3c743ac6323e1caf9e987d6946cc4b2333a8256 /security/security.c
parent42d64e1add3a1ce8a787116036163b8724362145 (diff)
parent5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff)
downloadop-kernel-dev-dd0a11815a339d6deeea8357574f8126a8404c92.zip
op-kernel-dev-dd0a11815a339d6deeea8357574f8126a8404c92.tar.gz
Merge tag 'v3.12'
Linux 3.12
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/security/security.c b/security/security.c
index 9404802..15b6928 100644
--- a/security/security.c
+++ b/security/security.c
@@ -348,10 +348,10 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
if (unlikely(IS_PRIVATE(inode)))
return 0;
- memset(new_xattrs, 0, sizeof new_xattrs);
if (!initxattrs)
return security_ops->inode_init_security(inode, dir, qstr,
NULL, NULL, NULL);
+ memset(new_xattrs, 0, sizeof(new_xattrs));
lsm_xattr = new_xattrs;
ret = security_ops->inode_init_security(inode, dir, qstr,
&lsm_xattr->name,
@@ -366,16 +366,14 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
goto out;
ret = initxattrs(inode, new_xattrs, fs_data);
out:
- for (xattr = new_xattrs; xattr->name != NULL; xattr++) {
- kfree(xattr->name);
+ for (xattr = new_xattrs; xattr->value != NULL; xattr++)
kfree(xattr->value);
- }
return (ret == -EOPNOTSUPP) ? 0 : ret;
}
EXPORT_SYMBOL(security_inode_init_security);
int security_old_inode_init_security(struct inode *inode, struct inode *dir,
- const struct qstr *qstr, char **name,
+ const struct qstr *qstr, const char **name,
void **value, size_t *len)
{
if (unlikely(IS_PRIVATE(inode)))
OpenPOWER on IntegriCloud