Mercurial > hg > nginx
comparison src/http/ngx_http_script.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 | 4251e72b8bb4 |
children | f1a91825730a |
comparison
equal
deleted
inserted
replaced
5315:31932b5464f0 | 5316:12dd27b74117 |
---|---|
1332 code = (ngx_http_script_full_name_code_t *) e->ip; | 1332 code = (ngx_http_script_full_name_code_t *) e->ip; |
1333 | 1333 |
1334 value.data = e->buf.data; | 1334 value.data = e->buf.data; |
1335 value.len = e->pos - e->buf.data; | 1335 value.len = e->pos - e->buf.data; |
1336 | 1336 |
1337 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, &value, code->conf_prefix) | 1337 if (ngx_get_full_name(e->request->pool, |
1338 code->conf_prefix | |
1339 ? (ngx_str_t *) &ngx_cycle->conf_prefix: | |
1340 (ngx_str_t *) &ngx_cycle->prefix, | |
1341 &value) | |
1338 != NGX_OK) | 1342 != NGX_OK) |
1339 { | 1343 { |
1340 e->ip = ngx_http_script_exit; | 1344 e->ip = ngx_http_script_exit; |
1341 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR; | 1345 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR; |
1342 return; | 1346 return; |