[PATCH 1/2] ubifs: xattr: Fix some potential memory leaks while iterating entries
Richard Weinberger
richard.weinberger at gmail.com
Sun Sep 13 15:08:02 EDT 2020
On Mon, Jun 1, 2020 at 11:11 AM Zhihao Cheng <chengzhihao1 at huawei.com> wrote:
>
> Fix some potential memory leaks in error handling branches while
> iterating xattr entries. For example, function ubifs_tnc_remove_ino()
> forgets to free pxent if it exists. Similar problems also exist in
> ubifs_purge_xattrs(), ubifs_add_orphan() and ubifs_jnl_write_inode().
>
> Signed-off-by: Zhihao Cheng <chengzhihao1 at huawei.com>
> Cc: <Stable at vger.kernel.org>
> Fixes: 1e51764a3c2ac05a2 ("UBIFS: add new flash file system")
I agree that this needs fixing. Did you also look into getting rid of pxent?
UBIFS uses the pxent pattern over and over and the same error got copy pasted
a lot. :-(
--
Thanks,
//richard
More information about the linux-mtd
mailing list