files_for_each_reflog_ent_reverse(): close stream and free strbuf on error
[gitweb.git] / setup.c
diff --git a/setup.c b/setup.c
index 6b48cb91ff2bdde1d02b2696b5b38a64cc663161..8f64fbdfb28fc2e487cfdba76561e5b3a25766f0 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -254,7 +254,7 @@ int get_common_dir_noenv(struct strbuf *sb, const char *gitdir)
                if (!is_absolute_path(data.buf))
                        strbuf_addf(&path, "%s/", gitdir);
                strbuf_addbuf(&path, &data);
-               strbuf_addstr(sb, real_path(path.buf));
+               strbuf_add_real_path(sb, path.buf);
                ret = 1;
        } else {
                strbuf_addstr(sb, gitdir);