This commit is contained in:
Andrew Clayton 2026-02-03 10:28:52 -08:00 committed by GitHub
commit 4fb0ce3bdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.data != NULL) {
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;
}
}