use absolute_pathdup()
[gitweb.git] / builtin / submodule--helper.c
index dbe5699fe688faeec3bdad899f229746b96be57f..c80f113521ca078e869dbe8f2f975aef95559992 100644 (file)
@@ -515,7 +515,7 @@ static int module_clone(int argc, const char **argv, const char *prefix)
                                   module_clone_options);
 
        strbuf_addf(&sb, "%s/modules/%s", get_git_dir(), name);
-       sm_gitdir = xstrdup(absolute_path(sb.buf));
+       sm_gitdir = absolute_pathdup(sb.buf);
        strbuf_reset(&sb);
 
        if (!is_absolute_path(path)) {