-rw-r--r-- | cgit.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -435,16 +435,17 @@ int main(int argc, const char **argv) prepare_context(&ctx); item.st.st_mtime = time(NULL); cgit_repolist.length = 0; cgit_repolist.count = 0; cgit_repolist.repos = NULL; parse_configfile(cgit_config_env ? cgit_config_env : CGIT_CONFIG, config_cb); + ctx.repo = NULL; if (getenv("SCRIPT_NAME")) ctx.cfg.script_name = xstrdup(getenv("SCRIPT_NAME")); if (getenv("QUERY_STRING")) ctx.qry.raw = xstrdup(getenv("QUERY_STRING")); cgit_parse_args(argc, argv); http_parse_querystring(ctx.qry.raw, querystring_cb); if (!cgit_prepare_cache(&item)) return 0; |