Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
commit: fix memory leak in `reduce_heads()`
[gitweb.git]
/
commit.c
diff --git
a/commit.c
b/commit.c
index d3150d627071316accafb7d9c69b5988050f4a8e..f73976bcc9bafe6de3b7d91e12aff1308b0c9210 100644
(file)
--- a/
commit.c
+++ b/
commit.c
@@
-1080,6
+1080,7
@@
struct commit_list *reduce_heads(struct commit_list *heads)
num_head = remove_redundant(array, num_head);
for (i = 0; i < num_head; i++)
tail = &commit_list_insert(array[i], tail)->next;
+ free(array);
return result;
}