projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0c9fd5
)
ext4: fix memory leak when symlink decryption fails
author
Eric Biggers
<ebiggers@google.com>
Thu, 15 Sep 2016 17:13:13 +0000
(13:13 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 15 Sep 2016 17:13:13 +0000
(13:13 -0400)
This bug was introduced in v4.8-rc1.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/symlink.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/symlink.c
b/fs/ext4/symlink.c
index 4d83d9e05f2e84197640b2aaa0215cfea8214381..04a7850a0d45e5b1058c64970439e2b5c683cd89 100644
(file)
--- a/
fs/ext4/symlink.c
+++ b/
fs/ext4/symlink.c
@@
-65,13
+65,12
@@
static const char *ext4_encrypted_get_link(struct dentry *dentry,
res = fscrypt_fname_alloc_buffer(inode, cstr.len, &pstr);
if (res)
goto errout;
+ paddr = pstr.name;
res = fscrypt_fname_disk_to_usr(inode, 0, 0, &cstr, &pstr);
if (res < 0)
goto errout;
- paddr = pstr.name;
-
/* Null-terminate the name */
if (res <= pstr.len)
paddr[res] = '\0';