aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_queue.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2023-10-17 02:39:38 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2023-10-17 02:39:38 +0300
commit284a0c73771e3a2c57af6e74d96d9a6878b2e7b4 (patch)
tree258499d824cb10d28328fb868105cf7f2c5e8818 /src/core/ngx_queue.c
parent6ceef192e7af1c507826ac38a2d43f08bf265fb9 (diff)
downloadnginx-284a0c73771e3a2c57af6e74d96d9a6878b2e7b4.tar.gz
nginx-284a0c73771e3a2c57af6e74d96d9a6878b2e7b4.zip
Core: fixed memory leak on configuration reload with PCRE2.
In ngx_regex_cleanup() allocator wasn't configured when calling pcre2_compile_context_free() and pcre2_match_data_free(), resulting in no ngx_free() call and leaked memory. Fix is ensure that allocator is configured for global allocations, so that ngx_free() is actually called to free memory. Additionally, ngx_regex_compile_context was cleared in ngx_regex_module_init(). It should be either not cleared, so it will be freed by ngx_regex_cleanup(), or properly freed. Fix is to not clear it, so ngx_regex_cleanup() will be able to free it. Reported by ZhenZhong Wu, https://mailman.nginx.org/pipermail/nginx-devel/2023-September/3Z5FIKUDRN2WBSL3JWTZJ7SXDA6YIWPB.html
Diffstat (limited to 'src/core/ngx_queue.c')
0 files changed, 0 insertions, 0 deletions