summaryrefslogtreecommitdiff
path: root/bisect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-29 02:23:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-29 02:23:43 (GMT)
commit69c54c72845ebc686d0f4bdd8d44b06f799b0a80 (patch)
treebbd4e768952cbd26dd7ddaec0ab915fcda9987a8 /bisect.c
parent14a8168e2fed3934f1f9afb286f1c64345d06790 (diff)
parent4d01a7fa65c50e817a935396432e199b7a565f53 (diff)
downloadgit-69c54c72845ebc686d0f4bdd8d44b06f799b0a80.zip
git-69c54c72845ebc686d0f4bdd8d44b06f799b0a80.tar.gz
git-69c54c72845ebc686d0f4bdd8d44b06f799b0a80.tar.bz2
Merge branch 'ma/leakplugs'
Memory leaks in various codepaths have been plugged. * ma/leakplugs: pack-bitmap[-write]: use `object_array_clear()`, don't leak object_array: add and use `object_array_pop()` object_array: use `object_array_clear()`, not `free()` leak_pending: use `object_array_clear()`, not `free()` commit: fix memory leak in `reduce_heads()` builtin/commit: fix memory leak in `prepare_index()`
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bisect.c b/bisect.c
index 2549eaf..96beeb5 100644
--- a/bisect.c
+++ b/bisect.c
@@ -826,7 +826,8 @@ static int check_ancestors(const char *prefix)
/* Clean up objects used, as they will be reused. */
clear_commit_marks_for_object_array(&pending_copy, ALL_REV_FLAGS);
- free(pending_copy.objects);
+
+ object_array_clear(&pending_copy);
return res;
}