ubifs: Fix memory leak in error path in ubifs_mknod
When fscrypt_setup_filename() fails we have to free dev. Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Родитель
9cd9a21ce0
Коммит
63ed657362
|
@ -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));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче