1
0
mirror of https://github.com/git/git.git synced 2024-09-29 10:51:21 +02:00

Merge branch 'js/blame-lib'

A hotfix to a topic already in 'master'.

* js/blame-lib:
  blame: fix memory corruption scrambling revision name in error message
This commit is contained in:
Junio C Hamano 2017-07-31 13:05:15 -07:00
commit 483709ab4d

@ -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);
}