oidmap: make entry cleanup explicit in oidmap_clear
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | oidmap: make entry cleanup explicit in oidmap_clearoidmap.c oidmap.h t/ | +76 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] oidmap: make entry cleanup explicit in oidmap_clear
Hello,
This small patch improves the clarity and safety of oidmap cleanup by making entry destruction explicit in oidmap_clear().
Previously, oidmap_clear() implicitly relied on callers to understand how and when stored entries were freed. This change introduces an explicit cleanup path, making ownership and lifecycle of oidmap entries clearer and less error-prone.
In addition to the implementation change, unit tests are added to exercise the cleanup semantics and verify correct behavior during map teardown.
Thanks,
Seyi
Seyi Kufoiji (1):
oidmap: make entry cleanup explicit in oidmap_clear
oidmap.c | 23 ++++++++++++++++++++--- oidmap.h | 15 +++++++++++++++ t/unit-tests/u-oidmap.c | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0