Skip to contentSkip to conversation

erofs-utils: lib: fix small fragments again

PATCH New Gao Xiang 1 participant 1 message Jun 26, 2025 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: lib: fix small fragments again

inode->fragment = NULL; overrides inode->fragmentoff, which is unintended.

In fact, the latest stress test [1] had already failed, but I didn't notice it. Fedora openQA tests [2] also reported the issue.

Fixes 9fa1a5838a2a ("erofs-utils: mkfs: fix memory leak from small fragments")

[1] https://github.com/erofs/erofsstress/actions/runs/15881657361
[2] https://bodhi.fedoraproject.org/updates/FEDORA-2025-e6256ddcc4

---
 lib/fragments.c | 1 -
 1 file changed, 1 deletion(-)
lib/fragments.c +0 -1
index 6111631..3278f47 100644
@@ -365,7 +365,6 @@ int erofs_fragment_commit(struct erofs_inode *inode, u32 tofh)
 		return 0;
 	}
 	inode->fragmentoff = (erofs_off_t)offset - len;
-	inode->fragment = NULL;
 	free(fi->data);
 	free(fi);
 	return 0;
Signature · 1 line
2.43.5