summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index e5fd40285..410cc3cd2 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -114,11 +114,13 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
ngx_cpystrn(cycle->conf_file.data, old_cycle->conf_file.data,
old_cycle->conf_file.len + 1);
- cycle->conf_param.len = old_cycle->conf_param.len;
- cycle->conf_param.data = ngx_pstrdup(pool, &old_cycle->conf_param);
- if (cycle->conf_param.data == NULL) {
- ngx_destroy_pool(pool);
- return NULL;
+ if (old_cycle->conf_param.len) {
+ cycle->conf_param.len = old_cycle->conf_param.len;
+ cycle->conf_param.data = ngx_pstrdup(pool, &old_cycle->conf_param);
+ if (cycle->conf_param.data == NULL) {
+ ngx_destroy_pool(pool);
+ return NULL;
+ }
}