X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-revert.c;h=7483a7a63bf09a7a123e442e9b933b9d24f2b1a6;hb=158629b2c9baffd0352306bd8dfa0784c981955d;hp=472554019afdb5e8e21f2d362f62f40eb569d8aa;hpb=a157400c972bbdeab2b5629658c99839c855f5ab;p=git.git diff --git a/builtin-revert.c b/builtin-revert.c index 472554019..7483a7a63 100644 --- a/builtin-revert.c +++ b/builtin-revert.c @@ -251,7 +251,7 @@ static int revert_or_cherry_pick(int argc, const char **argv) int i, index_fd, clean; char *oneline, *reencoded_message = NULL; const char *message, *encoding; - const char *defmsg = xstrdup(git_path("MERGE_MSG")); + char *defmsg = xstrdup(git_path("MERGE_MSG")); struct merge_options o; struct tree *result, *next_tree, *base_tree, *head_tree; static struct lock_file index_lock; @@ -432,6 +432,7 @@ static int revert_or_cherry_pick(int argc, const char **argv) return execv_git_cmd(args); } free(reencoded_message); + free(defmsg); return 0; }