home_config_paths(): let the caller ignore xdg path
[gitweb.git] / builtin / blame.c
index ef7cb1d254118afa3f241c5ae4236f3b57dda659..6a284ce46b4f3b46a47d033fca607cae710806bc 100644 (file)
@@ -2458,11 +2458,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
                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 {