diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-09-23 01:34:50 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-24 10:05:51 +0900 |
commit | cb7b29eb67772d08e2365ed07ede9d954d0344c1 (patch) | |
tree | f5eb5e520818e9290bc73e8684c55680886b8aa8 /commit.c | |
parent | dd1055ed594f8fef18779cce3cd921c4ac66cf9c (diff) | |
download | git-cb7b29eb67772d08e2365ed07ede9d954d0344c1.tar.gz |
commit: fix memory leak in `reduce_heads()`
We don't free the temporary scratch space we use with
`remove_redundant()`. Free it similar to how we do it in
`get_merge_bases_many_0()`.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |