diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2022-11-18 12:02:36 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-02-02 23:13:47 +0300 |
commit | 122deabfe1428bffe95e2bf364ff8a5059bdf089 (patch) | |
tree | 806e0fb8f304ad8cbafe9ec1c21555e4bb0fd896 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 944e096aa24071d3fe22822f6249d3ae309e39ea (diff) | |
download | linux-122deabfe1428bffe95e2bf364ff8a5059bdf089.tar.xz |
ubifs: dirty_cow_znode: Fix memleak in error handling path
Following process will cause a memleak for copied up znode:
dirty_cow_znode
zn = copy_znode(c, znode);
err = insert_old_idx(c, zbr->lnum, zbr->offs);
if (unlikely(err))
return ERR_PTR(err); // No one refers to zn.
Fix it by adding copied znode back to tnc, then it will be freed
by ubifs_destroy_tnc_subtree() while closing tnc.
Fetch a reproducer in [Link].
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216705
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions