diff options
Diffstat (limited to 'src/core/ngx_file.c')
-rw-r--r-- | src/core/ngx_file.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index f5a1c6601..ee4c653db 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -202,8 +202,14 @@ char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) return "is duplicate"; } - ngx_test_null(path, ngx_pcalloc(cf->pool, sizeof(ngx_path_t)), NULL); + /* TODO: check duplicate in cf->cycle->pathes */ + ngx_test_null(path, ngx_pcalloc(cf->pool, sizeof(ngx_path_t)), + NGX_CONF_ERROR); + + *pp = path; + + ngx_test_null(pp, ngx_push_array(&cf->cycle->pathes), NGX_CONF_ERROR); *pp = path; value = (ngx_str_t *) cf->args->elts; @@ -225,5 +231,7 @@ char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) path->level[i++] = 0; } + path->gc_handler = cmd->post; + return NGX_CONF_OK; } |