Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/blame-lib'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 31 Jul 2017 20:05:15 +0000
(13:05 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 31 Jul 2017 20:05:15 +0000
(13:05 -0700)
A hotfix to a topic already in 'master'.
* js/blame-lib:
blame: fix memory corruption scrambling revision name in error message
blame.c
patch
|
blob
|
history
raw
(from parent 1:
5800c63
)
diff --git
a/blame.c
b/blame.c
index 91e26e93e8a23d0af63e1bc8a74e9f7690276ab4..f575e9cbf4e3224049fe43b7f794d2dd8770eda7 100644
(file)
--- a/
blame.c
+++ b/
blame.c
@@
-1663,7
+1663,7
@@
static struct commit *find_single_final(struct rev_info *revs,
name = revs->pending.objects[i].name;
}
if (name_p)
- *name_p =
name
;
+ *name_p =
xstrdup_or_null(name)
;
return found;
}
@@
-1735,7
+1735,7
@@
static struct commit *find_single_initial(struct rev_info *revs,
die("No commit to dig up from?");
if (name_p)
- *name_p =
name
;
+ *name_p =
xstrdup(name)
;
return found;
}
@@
-1843,6
+1843,8
@@
void setup_scoreboard(struct blame_scoreboard *sb, const char *path, struct blam
if (orig)
*orig = o;
+
+ free((char *)final_commit_name);
}