aboutsummaryrefslogtreecommitdiffstats
path: root/alloc.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-18 10:07:02 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-18 10:07:02 -0700
commit44c0d062bd2fed84ba1ac930a153de37a5280cd3 (patch)
tree478570ca6a65df8185af7a24b5f2dc9a64850a6d /alloc.h
parentMerge branch 'jk/curl-global-trace-components' (diff)
parentalloc: fix dangling pointer in alloc_state cleanup (diff)
downloadgit-44c0d062bd2fed84ba1ac930a153de37a5280cd3.tar.gz
git-44c0d062bd2fed84ba1ac930a153de37a5280cd3.zip
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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/alloc.h b/alloc.h
index 3f4a0ad310..87a47a9709 100644
--- a/alloc.h
+++ b/alloc.h
@@ -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