[PATCH v1] erofs: fix possible memory leak in z_erofs_gbuf_exit()

Chao Yu chao at kernel.org
Wed Jun 26 18:26:25 AEST 2024


On 2024/6/25 6:02, Sandeep Dhavale wrote:
> Because we incorrectly reused of variable `i` in `z_erofs_gbuf_exit()`
> for inner loop, we may exit early from outer loop resulting in memory
> leak. Fix this by using separate variable for iterating through inner loop.
> 
> Fixes: f36f3010f676 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable")
> 
> Signed-off-by: Sandeep Dhavale <dhavale at google.com>

Reviewed-by: Chao Yu <chao at kernel.org>

Thanks,


More information about the Linux-erofs mailing list