aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-git-receiver/pre-receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-git-receiver/pre-receive.c')
-rw-r--r--src/blogc-git-receiver/pre-receive.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c
index 9611567..2081b4f 100644
--- a/src/blogc-git-receiver/pre-receive.c
+++ b/src/blogc-git-receiver/pre-receive.c
@@ -125,6 +125,11 @@ bgr_pre_receive_hook(int argc, char *argv[])
}
const char *sym_tmp = bc_config_get(config, section, "symlink");
+ if (sym_tmp == NULL) {
+ bc_config_free(config);
+ goto default_sym;
+ }
+
sym = bc_str_starts_with(sym_tmp, "/") ? bc_strdup(sym_tmp) :
bc_strdup_printf("%s/%s", repo_dir, sym_tmp);
free(section);