diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-27 10:57:02 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-27 10:57:02 +0900 |
commit | 80a0e0fdd6b51744a7c76583874e2993df645e47 (patch) | |
tree | 3ca2a1e5a94ab89c59d7f3084c7339cd23dd312a /commit.c | |
parent | 03e8004f0674a704330519d07fa84957989e2686 (diff) | |
parent | 4da72644b768b0491110a8ba0aa84d32b6bde41c (diff) | |
download | git-80a0e0fdd6b51744a7c76583874e2993df645e47.tar.gz |
Merge branch 'ma/reduce-heads-leakfix' into maint
Leak fixes.
* ma/reduce-heads-leakfix:
reduce_heads: fix memory leaks
builtin/merge-base: free commit lists
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1090,6 +1090,13 @@ struct commit_list *reduce_heads(struct commit_list *heads) return result; } +void reduce_heads_replace(struct commit_list **heads) +{ + struct commit_list *result = reduce_heads(*heads); + free_commit_list(*heads); + *heads = result; +} + static const char gpg_sig_header[] = "gpgsig"; static const int gpg_sig_header_len = sizeof(gpg_sig_header) - 1; |