Commit 63ed6573 authored by Richard Weinberger's avatar Richard Weinberger

ubifs: Fix memory leak in error path in ubifs_mknod

When fscrypt_setup_filename() fails we have to free dev.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 9cd9a21c
...@@ -1068,8 +1068,10 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -1068,8 +1068,10 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry,
} }
err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm); err = fscrypt_setup_filename(dir, &dentry->d_name, 0, &nm);
if (err) if (err) {
kfree(dev);
goto out_budg; goto out_budg;
}
sz_change = CALC_DENT_SIZE(fname_len(&nm)); sz_change = CALC_DENT_SIZE(fname_len(&nm));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment