summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e75abf)
raw | patch | inline | side by side (parent: 8e75abf)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Sun, 21 Mar 2010 02:01:20 +0000 (21:01 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 21 Mar 2010 02:25:48 +0000 (19:25 -0700) |
We forgot to free defmsg when returning early for a fast-forward.
Fixing this should reduce noise during test suite runs with valgrind.
More importantly, once cherry-pick learns to pick multiple commits,
the amount of memory leaked would start to add up.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Fixing this should reduce noise during test suite runs with valgrind.
More importantly, once cherry-pick learns to pick multiple commits,
the amount of memory leaked would start to add up.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-revert.c | patch | blob | history |
diff --git a/builtin-revert.c b/builtin-revert.c
index 476f41e760069ba4121e2bbf4a95bc1f3bc3c264..9a3c14c329713f16d14147b81a4b8031028a4f82 100644 (file)
--- a/builtin-revert.c
+++ b/builtin-revert.c
int i, index_fd, clean;
char *oneline, *reencoded_message = NULL;
const char *message, *encoding;
- char *defmsg = git_pathdup("MERGE_MSG");
+ char *defmsg = NULL;
struct merge_options o;
struct tree *result, *next_tree, *base_tree, *head_tree;
static struct lock_file index_lock;
* reverse of it if we are revert.
*/
+ defmsg = git_pathdup("MERGE_MSG");
msg_fd = hold_lock_file_for_update(&msg_file, defmsg,
LOCK_DIE_ON_ERROR);