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> Thanks,