diff options
author | Valentin Bartenev <vbart@nginx.com> | 2013-08-06 19:58:40 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2013-08-06 19:58:40 +0400 |
commit | 3c5bd34771be032ef14e59f934058b3dce93588b (patch) | |
tree | a71e5b734bca4200959241d928410ba98f48070b /src/core/ngx_file.h | |
parent | 1b7bc342186ff0768c06419a134032adb2a536f8 (diff) | |
download | nginx-3c5bd34771be032ef14e59f934058b3dce93588b.tar.gz nginx-3c5bd34771be032ef14e59f934058b3dce93588b.zip |
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.
Diffstat (limited to 'src/core/ngx_file.h')
-rw-r--r-- | src/core/ngx_file.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h index 18abf1423..3ea6c28c8 100644 --- a/src/core/ngx_file.h +++ b/src/core/ngx_file.h @@ -122,6 +122,9 @@ struct ngx_tree_ctx_s { }; +ngx_int_t ngx_get_full_name(ngx_pool_t *pool, ngx_str_t *prefix, + ngx_str_t *name); + ssize_t ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain); ngx_int_t ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, ngx_pool_t *pool, ngx_uint_t persistent, ngx_uint_t clean, |