Merge branch 'mh/avoid-rewriting-packed-refs' into maint
[gitweb.git] / builtin / merge.c
index ab5ffe85e8f5d7a359004f2bbb52a5778d0b91b4..fbbf2a9e5eb9be47d8574ca0bab175c5a6c0d15d 100644 (file)
@@ -999,6 +999,7 @@ static struct commit_list *reduce_parents(struct commit *head_commit,
 
        /* Find what parents to record by checking independent ones. */
        parents = reduce_heads(remoteheads);
+       free_commit_list(remoteheads);
 
        remoteheads = NULL;
        remotes = &remoteheads;