]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
ui-repolist: initialize char *buf to NULL
[ps-cgit] / scan-tree.c
index e900ad9ff009a897f056bb0ceb183bcd37ed6f17..b5a10ffa5cf491c6ec811413740db20ad0dfb583 100644 (file)
@@ -45,8 +45,8 @@ out:
        return result;
 }
 
-struct cgit_repo *repo;
-repo_config_fn config_fn;
+static struct cgit_repo *repo;
+static repo_config_fn config_fn;
 
 static void repo_config(const char *name, const char *value)
 {
@@ -174,7 +174,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
 
        strbuf_addstr(path, "cgitrc");
        if (!stat(path->buf, &st))
-               parse_configfile(xstrdup(path->buf), &repo_config);
+               parse_configfile(path->buf, &repo_config);
 
        strbuf_release(&rel);
 }