]> git.kaiwu.me - nginx.git/commit
SSL: fixed potential leak on memory allocation errors.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:48:39 +0000 (16:48 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:48:39 +0000 (16:48 +0300)
commitfe43346dc3151e80dae0acd751f0a94314dcb91c
tree8da39450985963593478b57609232c43a4be4159
parent99d7bb690924e60e9e03096ac5e507111f7c182d
SSL: fixed potential leak on memory allocation errors.

If ngx_pool_cleanup_add() fails, we have to clean just created SSL context
manually, thus appropriate call added.

Additionally, ngx_pool_cleanup_add() moved closer to ngx_ssl_create() in
the ngx_http_ssl_module, to make sure there are no leaks due to intermediate
code.
src/http/modules/ngx_http_grpc_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_ssl_module.c
src/http/modules/ngx_http_uwsgi_module.c
src/mail/ngx_mail_ssl_module.c
src/stream/ngx_stream_proxy_module.c
src/stream/ngx_stream_ssl_module.c