diff options
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c index e2a4834706..f9906586ee 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1864,9 +1864,7 @@ static void file_change_cr(struct branch *b, int rename) endp = strchr(s, ' '); if (!endp) die("Missing space after source: %s", command_buf.buf); - s_uq = xmalloc(endp - s + 1); - memcpy(s_uq, s, endp - s); - s_uq[endp - s] = 0; + s_uq = xmemdupz(s, endp - s); } s = s_uq; |