diff options
Diffstat (limited to 'builtin/blame.c')
-rw-r--r-- | builtin/blame.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index ef7cb1d254..6a284ce46b 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2458,11 +2458,8 @@ parse_done: die("revision walk setup failed"); if (is_null_sha1(sb.final->object.sha1)) { - char *buf; o = sb.final->util; - buf = xmalloc(o->file.size + 1); - memcpy(buf, o->file.ptr, o->file.size + 1); - sb.final_buf = buf; + sb.final_buf = xmemdupz(o->file.ptr, o->file.size); sb.final_buf_size = o->file.size; } else { |