Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82f1f40d authored by Kemeng Shi's avatar Kemeng Shi Committed by Vegard Nossum
Browse files

jbd2: avoid memleak in jbd2_journal_write_metadata_buffer



[ Upstream commit cc102aa24638b90e04364d64e4f58a1fa91a1976 ]

The new_bh is from alloc_buffer_head, we should call free_buffer_head to
free it in error case.

Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240514112438.1269037-2-shikemeng@huaweicloud.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 831db95409cc12589c14a71b9bf6c3e7f70bf5a0)
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
parent 00a39f4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment