mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ubifs: ubifs_jnl_write_inode: Fix a memory leak bug
[ Upstream commit81423c7855] When inodes with extended attributes are evicted, xent is not freed in one exit branch. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Fixes:9ca2d73264("ubifs: Limit number of xattrs per inode") Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
535943c46d
commit
17bc3bff02
@@ -906,6 +906,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode)
|
||||
ubifs_err(c, "dead directory entry '%s', error %d",
|
||||
xent->name, err);
|
||||
ubifs_ro_mode(c, err);
|
||||
kfree(xent);
|
||||
goto out_release;
|
||||
}
|
||||
ubifs_assert(c, ubifs_inode(xino)->xattr);
|
||||
|
||||
Reference in New Issue
Block a user