reduce_heads: fix memory leaks
[gitweb.git] / builtin / commit.c
index d75b3805ea7fe3475564f337bf660d8155909445..11c47401854fa4bfd8b75429f053882ff1c61551 100644 (file)
@@ -1728,7 +1728,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
                                allow_fast_forward = 0;
                }
                if (allow_fast_forward)
-                       parents = reduce_heads(parents);
+                       reduce_heads_replace(&parents);
        } else {
                if (!reflog_msg)
                        reflog_msg = (whence == FROM_CHERRY_PICK)