Mercurial > hg > nginx
diff src/http/ngx_http_variables.c @ 5316:12dd27b74117
Fixed memory leaks in the root and auth_basic_user_file directives.
If a relative path is set by variables, then the ngx_conf_full_name()
function was called while processing requests, which causes allocations
from the cycle pool.
A new function that takes pool as an argument was introduced.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 06 Aug 2013 19:58:40 +0400 |
parents | a64c8a5da336 |
children | 6b479db5b52b |
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c Mon Aug 05 14:30:03 2013 +0400 +++ b/src/http/ngx_http_variables.c Tue Aug 06 19:58:40 2013 +0400 @@ -1374,7 +1374,9 @@ return NGX_ERROR; } - if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) { + if (ngx_get_full_name(r->pool, (ngx_str_t *) &ngx_cycle->prefix, &path) + != NGX_OK) + { return NGX_ERROR; } @@ -1416,7 +1418,9 @@ path.data[path.len - 1] = '\0'; - if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &path, 0) != NGX_OK) { + if (ngx_get_full_name(r->pool, (ngx_str_t *) &ngx_cycle->prefix, &path) + != NGX_OK) + { return NGX_ERROR; } }