real_path: have callers use real_pathdup and strbuf_realpath
[gitweb.git] / submodule.c
index 6f7d883de950af8ba6427537d09e021a4bed36bd..c85ba50110606a72776fc7a95a2c6be3875b1751 100644 (file)
@@ -1227,7 +1227,7 @@ void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
 {
        struct strbuf file_name = STRBUF_INIT;
        struct strbuf rel_path = STRBUF_INIT;
-       const char *real_work_tree = xstrdup(real_path(work_tree));
+       const char *real_work_tree = real_pathdup(work_tree);
 
        /* Update gitfile */
        strbuf_addf(&file_name, "%s/.git", work_tree);