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:
9cd9a21
)
ubifs: Fix memory leak in error path in ubifs_mknod
author
Richard Weinberger
<richard@nod.at>
Fri, 10 Feb 2017 16:46:01 +0000
(17:46 +0100)
committer
Richard Weinberger
<richard@nod.at>
Thu, 30 Mar 2017 07:27:27 +0000
(09:27 +0200)
When fscrypt_setup_filename() fails we have to free dev.
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ubifs/dir.c
b/fs/ubifs/dir.c
index 30825d882aa94a4c2486d47581f33d1dfca1a409..51929be655c32638ff5047507e186057c16ab4e4 100644
(file)
--- a/
fs/ubifs/dir.c
+++ b/
fs/ubifs/dir.c
@@
-1068,8
+1068,10
@@
static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
}
err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
- if (err)
+ if (err) {
+ kfree(dev);
goto out_budg;
+ }
sz_change = CALC_DENT_SIZE(fname_len(&nm));