cleanup: use internal memory allocation wrapper functions everywhere
[gitweb.git] / builtin / mv.c
index 40f33ca4d0e6d0bb1733e0544029c6f588d09b59..e9d191f0562df86d9a19311704cb5fc77e9b8caf 100644 (file)
@@ -29,7 +29,7 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec,
                        to_copy--;
                if (to_copy != length || base_name) {
                        char *it = xmemdupz(result[i], to_copy);
-                       result[i] = base_name ? strdup(basename(it)) : it;
+                       result[i] = base_name ? xstrdup(basename(it)) : it;
                }
        }
        return get_pathspec(prefix, result);