First memleak is found by mounting corrupted UBIFS image with chk_index enabled. Second memleak is found by powercut testing for encryption scenario. v1->v2: ubifs_symlink: Call fscrypt_free_inode() directly in error handling path. Add 'Cc: stable@xxxxxxxxxxxxxxx' and 'Suggested-by' tags in patch 2. v2->v3: Handle tnc releasing in error handling path in dbg_check_idx_size(). Zhihao Cheng (2): ubifs: dbg_check_idx_size: Fix kmemleak if loading znode failed ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path fs/ubifs/debug.c | 9 +++++++-- fs/ubifs/dir.c | 2 ++ fs/ubifs/tnc.c | 9 +-------- fs/ubifs/tnc_misc.c | 22 ++++++++++++++++++++++ fs/ubifs/ubifs.h | 1 + 5 files changed, 33 insertions(+), 10 deletions(-) -- 2.39.2