Skip to content
Commit 9d01f6f6 authored by Sandeep Dhavale's avatar Sandeep Dhavale Committed by Gao Xiang
Browse files

erofs: fix possible memory leak in z_erofs_gbuf_exit()

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: f36f3010

 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable")
Signed-off-by: default avatarSandeep Dhavale <dhavale@google.com>
Reviewed-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20240624220206.3373197-1-dhavale@google.com
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent f2661062
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment