diff options
author | Junio C Hamano <gitster@pobox.com> | 2025-09-18 10:07:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-09-18 10:07:02 -0700 |
commit | 44c0d062bd2fed84ba1ac930a153de37a5280cd3 (patch) | |
tree | 478570ca6a65df8185af7a24b5f2dc9a64850a6d /alloc.h | |
parent | bf781d93b6b768c6e2bef12af73fcb3e14dd1a33 (diff) | |
parent | 5e2feb5ca692c5c4d39b11e1ffa056911dd7dfd3 (diff) |
Merge branch 'ne/alloc-free-and-null'
The clear_alloc_state() API function was not fully clearing the
structure for reuse, but since nobody reuses it, replace it with a
variant that frees the structure as well, making the callers simpler.
* ne/alloc-free-and-null:
alloc: fix dangling pointer in alloc_state cleanup
Diffstat (limited to 'alloc.h')
-rw-r--r-- | alloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14,7 +14,7 @@ void *alloc_commit_node(struct repository *r); void *alloc_tag_node(struct repository *r); void *alloc_object_node(struct repository *r); -struct alloc_state *allocate_alloc_state(void); -void clear_alloc_state(struct alloc_state *s); +struct alloc_state *alloc_state_alloc(void); +void alloc_state_free_and_null(struct alloc_state **s_); #endif |