aboutsummaryrefslogtreecommitdiff
path: root/security/commoncap.c
diff options
context:
space:
mode:
authorSiluxsept <ronny.horn.rh@gmail.com>2024-02-06 04:37:40 +0100
committerSiluxsept <ronny.horn.rh@gmail.com>2024-02-06 04:38:56 +0100
commit8e8137ac800bdc27181743ec73d0e90e28b4e8af (patch)
tree7e2fbc9d9e305e46414c21d08eeaeb1d56ccb0f0 /security/commoncap.c
parent9c2f9bfc860f0cd6f2d3320b5f72a0f4adf24b25 (diff)
merge branch lineage-20 into t13.0t13.0
https: //github.com/LineageOS/android_kernel_google_redbull Change-Id: I4a450eb794cc99abf711ad3b5b82946092be84ba
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 876cfe01d939..28b204eacc7a 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -397,8 +397,10 @@ int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer,
&tmpbuf, size, GFP_NOFS);
dput(dentry);
- if (ret < 0 || !tmpbuf)
- return ret;
+ if (ret < 0 || !tmpbuf) {
+ size = ret;
+ goto out_free;
+ }
fs_ns = inode->i_sb->s_user_ns;
cap = (struct vfs_cap_data *) tmpbuf;