Commit 6ff1507
list-objects-filter: use oidmap_clear_with_free() for cleanup
Replace the use of oidmap_clear(&seen_at_depth, 1) in
filter_trees_free() with oidmap_clear_with_free().
The seen_at_depth map stores heap-allocated struct
seen_map_entry objects. Previously, passing 1 relied on
oidmap_clear() internally calling free() on each entry.
Convert this to the explicit oidmap_clear_with_free() API
and provide a typed free_seen_map_entry() helper to free
each container entry.
This makes the ownership and cleanup policy explicit and
removes reliance on the legacy boolean free_entries
parameter.
Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent bbf93f9 commit 6ff1507
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
244 | 251 | | |
245 | 252 | | |
246 | 253 | | |
247 | | - | |
| 254 | + | |
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| |||
0 commit comments