X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=builtin-revert.c;h=4038b4118da087069db82bfcf6e0dd298aec9036;hb=6e13921b4f7adcc7316a76c0c4955b85b1589a65;hp=7e50c2aa542772b2bac7c599df8865c3dbae5bcd;hpb=98b35e2c749614446b916230148d66857e8a09f3;p=git.git diff --git a/builtin-revert.c b/builtin-revert.c index 7e50c2aa5..4038b4118 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 = git_pathdup("MERGE_MSG"); + char *defmsg = git_pathdup("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; }