about summary refs log tree commit diff stats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c index afafcce..d145f8a 100644 --- a/cgit.c +++ b/cgit.c
@@ -401,9 +401,9 @@ static void prepare_context(struct cgit_context *ctx)
401 ctx->page.etag = NULL; 401 ctx->page.etag = NULL;
402 memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list)); 402 memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list));
403 if (ctx->env.script_name) 403 if (ctx->env.script_name)
404 ctx->cfg.script_name = ctx->env.script_name; 404 ctx->cfg.script_name = xstrdup(ctx->env.script_name);
405 if (ctx->env.query_string) 405 if (ctx->env.query_string)
406 ctx->qry.raw = ctx->env.query_string; 406 ctx->qry.raw = xstrdup(ctx->env.query_string);
407 if (!ctx->env.cgit_config) 407 if (!ctx->env.cgit_config)
408 ctx->env.cgit_config = CGIT_CONFIG; 408 ctx->env.cgit_config = CGIT_CONFIG;
409} 409}