]> git.kaiwu.me - nginx.git/commit
Core: fixed environment on exit.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 7 Dec 2016 16:03:31 +0000 (19:03 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 7 Dec 2016 16:03:31 +0000 (19:03 +0300)
commit23946be384c42478f3dbc661f60ac0903d1b97f2
treeba5627ec51c71d53d63f042ca56b3cf3777d5428
parent0a90c428b8be794b9244c8a5f0084f4d19feebbb
Core: fixed environment on exit.

On exit environment allocated from a pool is no longer available, leading
to a segmentation fault if, for example, a library tries to use it from
an atexit() handler.

Fix is to allocate environment via ngx_alloc() instead, and explicitly
free it using a pool cleanup handler if it's no longer used (e.g., on
configuration reload).
src/core/nginx.c