Merge branch 'js/mingw-tests-2.8' into maint
[gitweb.git] / builtin / merge-tree.c
index d4f0cbd45149eebe15f53ff8c34eefd9b3803d82..ca570041df0f67efa92b056cec01e7d9a4e38ad7 100644 (file)
@@ -174,7 +174,7 @@ static struct merge_list *create_entry(unsigned stage, unsigned mode, const unsi
 
 static char *traverse_path(const struct traverse_info *info, const struct name_entry *n)
 {
-       char *path = xmalloc(traverse_path_len(info, n) + 1);
+       char *path = xmallocz(traverse_path_len(info, n));
        return make_traverse_path(path, info, n);
 }