summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-02-13 02:16:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-13 17:08:58 (GMT)
commitacac50dd8c2c9725841b3e9143d78c6345dc076c (patch)
treeafa32ba98f25de1dff2bd6cae0ea4f3cda6b8fc9 /object.h
parent551cf8b655fa73c90dabea633d41b5f10deffaf2 (diff)
downloadgit-acac50dd8c2c9725841b3e9143d78c6345dc076c.zip
git-acac50dd8c2c9725841b3e9143d78c6345dc076c.tar.gz
git-acac50dd8c2c9725841b3e9143d78c6345dc076c.tar.bz2
pack-bitmap: fix leak of haves/wants object lists
When we do a bitmap-aware revision traversal, we create an object_list for each of the "haves" and "wants" tips. After creating the result bitmaps these are no longer needed or used, but we never free the list memory. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object.h')
-rw-r--r--object.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/object.h b/object.h
index 25f5ab3..2dbabfc 100644
--- a/object.h
+++ b/object.h
@@ -151,6 +151,8 @@ struct object_list *object_list_insert(struct object *item,
int object_list_contains(struct object_list *list, struct object *obj);
+void object_list_free(struct object_list **list);
+
/* Object array handling .. */
void add_object_array(struct object *obj, const char *name, struct object_array *array);
void add_object_array_with_path(struct object *obj, const char *name, struct object_array *array, unsigned mode, const char *path);