提交 81423c78 编写于 作者: Z Zhihao Cheng 提交者: Richard Weinberger

ubifs: ubifs_jnl_write_inode: Fix a memory leak bug

When inodes with extended attributes are evicted, xent is not freed in one
exit branch.
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Fixes: 9ca2d732 ("ubifs: Limit number of xattrs per inode")
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 4ab25ac8
......@@ -905,6 +905,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册