Skip to content

Commit a4b7a95

Browse files
dmantipovgregkh
authored andcommitted
ocfs2: fix memory leak in ocfs2_merge_rec_left()
[ Upstream commit 2214ec4 ] In 'ocfs2_merge_rec_left()', do not reset 'left_path' to NULL after move, thus allowing 'ocfs2_free_path()' to free it before return. Link: https://lkml.kernel.org/r/20251205065159.392749-1-dmantipov@yandex.ru Fixes: 677b975 ("ocfs2: Add support for cross extent block") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Reported-by: syzbot+cfc7cab3bb6eaa7c4de2@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=cfc7cab3bb6eaa7c4de2 Reviewed-by: Heming Zhao <heming.zhao@suse.com> Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3873afc commit a4b7a95

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/ocfs2/alloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3654,7 +3654,6 @@ static int ocfs2_merge_rec_left(struct ocfs2_path *right_path,
36543654
* So we use the new rightmost path.
36553655
*/
36563656
ocfs2_mv_path(right_path, left_path);
3657-
left_path = NULL;
36583657
} else
36593658
ocfs2_complete_edge_insert(handle, left_path,
36603659
right_path, subtree_index);

0 commit comments

Comments
 (0)