[PATCH 0/1] oidmap: make entry cleanup explicit in oidmap_clear
- From
Seyi Kufoiji <kuforiji98@gmail.com>
- Date
- Jan 15, 2026, 13:16 UTC
- Message-ID
- <20260115131634.51968-1-kuforiji98@gmail.com>
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(-)
-- 2.43.0