Re: [PATCH 1/2] ubifs: xattr: Fix some potential memory leaks while iterating entries

2020-09-17 Thread Richard Weinberger
On Mon, Sep 14, 2020 at 5:25 AM Zhihao Cheng wrote: > 在 2020/9/14 3:08, Richard Weinberger 写道: > > On Mon, Jun 1, 2020 at 11:11 AM Zhihao Cheng > > wrote: > The kill_xattrs process is more intuitive without the pxent. However, > the release process for the memory (stores xent->name) is similar

Re: [PATCH 1/2] ubifs: xattr: Fix some potential memory leaks while iterating entries

2020-09-13 Thread Zhihao Cheng
在 2020/9/14 3:08, Richard Weinberger 写道: On Mon, Jun 1, 2020 at 11:11 AM Zhihao Cheng wrote: 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. :-( I thought about it. I'm not

Re: [PATCH 1/2] ubifs: xattr: Fix some potential memory leaks while iterating entries

2020-09-13 Thread Richard Weinberger
On Mon, Jun 1, 2020 at 11:11 AM Zhihao Cheng 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(),

[PATCH 1/2] ubifs: xattr: Fix some potential memory leaks while iterating entries

2020-06-01 Thread Zhihao Cheng
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