[PATCH] erofs-utils: fix resource leaks and missing returns on error paths

Gao Xiang hsiangkao at linux.alibaba.com
Sat Mar 21 16:16:36 AEDT 2026



On 2026/3/21 13:07, Nithurshen wrote:
> Hi Xiang,
> 
> Both the patches LGTM.

I only see one patch here, if they are unrelated, please seperate
nto two patches intead.

> 
> I tested the missing return by truncating an image to force an I/O
> error, and the FUSE daemon now correctly aborts instead of hanging.

It seems the first one can be formed into a testcase
in experimental-tests?


> I also dynamically tested the memory leak fix using Valgrind with a
> 10MB file and an injected Z_STREAM_ERROR, confirming 0 bytes lost.
> 
> The only note is that this should be sent as 2 separate patches in
> the same thread.
> 
> Reviewed-by: Nithurshen <nithurshen.dev at gmail.com>
> Tested-by: Nithurshen <nithurshen.dev at gmail.com>

Thanks for the test.

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list