commit | f3f4f884682581bca60b2e5215a143a64de2a065 | [log] [tgz] |
---|---|---|
author | Maxim Dounin <mdounin@mdounin.ru> | Wed Dec 07 19:03:31 2016 +0300 |
committer | Maxim Dounin <mdounin@mdounin.ru> | Wed Dec 07 19:03:31 2016 +0300 |
tree | ba5627ec51c71d53d63f042ca56b3cf3777d5428 | |
parent | a1f62460b962fd148d9ef3fb7df8056495410e55 [diff] |
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).