]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: do_kill_orphans: Fix a memory leak bug
authorZhihao Cheng <chengzhihao1@huawei.com>
Tue, 29 Oct 2019 12:58:23 +0000 (20:58 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 17 Nov 2019 21:22:54 +0000 (22:22 +0100)
commit7e5537aeadb77b5f30a7634e694679333b31be97
treef4dcff26c9a18d61c8603ff195034ac98b5127ea
parent901de7f3609ab98ea0662fc6605a9f640e4cf76b
ubifs: do_kill_orphans: Fix a memory leak bug

If there are more than one valid snod on the sleb->nodes list,
do_kill_orphans will malloc ino more than once without releasing
previous ino's memory. Finally, it will trigger memory leak.

Fixes: 0ed795399e23 ("ubifs: Check link count of inodes when...")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/orphan.c