Hi Chao,

On 2025/7/15 10:35, Chao Yu wrote:
On 7/12/25 07:35, Sandeep Dhavale wrote:
In android the LeakSanitizer reported memory leaks originating
from functions like erofs_get_selabel_xattr.

The root cause is that the 'kvbuf' buffer, which is allocated to
store xattr data, was not being freed when its owning
'xattr_item' struct was deallocated. The functions put_xattritem()
and erofs_cleanxattrs() were freeing the xattr_item struct but
neglected to free the kvbuf pointer within it.

This patch fixes the leak by adding the necessary free() calls for
kvbuf in both functions.

Signed-off-by: Sandeep Dhavale <dhav...@google.com>

Reviewed-by: Chao Yu <c...@kernel.org>

I released erofs-utils 1.8.10 hours ago to resolve some
fragment mkfs regression so it won't be in appended.

But thanks for your review!

Thanks,
Gao Xiang


Thanks,


Reply via email to