mbox series

[v2,0/2] ubifs: Fix two kmemleaks in error path

Message ID 20231222085446.781838-1-chengzhihao1@huawei.com (mailing list archive)
Headers show
Series ubifs: Fix two kmemleaks in error path | expand

Message

Zhihao Cheng Dec. 22, 2023, 8:54 a.m. UTC
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@vger.kernel.org' and 'Suggested-by' tags in patch 2.

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/dir.c   | 2 ++
 fs/ubifs/super.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)