diff options
author | Paul Moore <pmoore@redhat.com> | 2013-11-27 02:32:55 +0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2013-11-27 02:32:55 +0400 |
commit | dd0a11815a339d6deeea8357574f8126a8404c92 (patch) | |
tree | c3c743ac6323e1caf9e987d6946cc4b2333a8256 /security/security.c | |
parent | 42d64e1add3a1ce8a787116036163b8724362145 (diff) | |
parent | 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff) | |
download | linux-dd0a11815a339d6deeea8357574f8126a8404c92.tar.xz |
Merge tag 'v3.12'
Linux 3.12
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/security/security.c b/security/security.c index 94048028bdd1..15b6928592ef 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))) |