Skip to content

Commit 81423c7

Browse files
Zhihao Chengrichardweinberger
authored andcommitted
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: Zhihao Cheng <[email protected]> Fixes: 9ca2d73 ("ubifs: Limit number of xattrs per inode") Signed-off-by: Richard Weinberger <[email protected]>
1 parent 4ab25ac commit 81423c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ubifs/journal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode)
905905
ubifs_err(c, "dead directory entry '%s', error %d",
906906
xent->name, err);
907907
ubifs_ro_mode(c, err);
908+
kfree(xent);
908909
goto out_release;
909910
}
910911
ubifs_assert(c, ubifs_inode(xino)->xattr);

0 commit comments

Comments
 (0)