diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2021-04-07 15:14:41 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-04-07 15:14:41 +0300 |
commit | b61176b9f7e8c8649e14cbb8532de6e3cf560f63 (patch) | |
tree | 827b12a00871dc81ca4ed6191db811adeed8a816 /src | |
parent | 0ad83da4f7ea94976e1d5684a62ed1ad2ff4517c (diff) | |
download | nginx-b61176b9f7e8c8649e14cbb8532de6e3cf560f63.tar.gz nginx-b61176b9f7e8c8649e14cbb8532de6e3cf560f63.zip |
QUIC: fixed memory leak in ngx_hkdf_extract()/ngx_hkdf_expand().
This fixes leak on successful path when built with OpenSSL.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_protection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_protection.c b/src/event/quic/ngx_event_quic_protection.c index efc15a22b..12dd233b8 100644 --- a/src/event/quic/ngx_event_quic_protection.c +++ b/src/event/quic/ngx_event_quic_protection.c @@ -348,6 +348,8 @@ ngx_hkdf_expand(u_char *out_key, size_t out_len, const EVP_MD *digest, goto failed; } + EVP_PKEY_CTX_free(pctx); + return NGX_OK; failed: @@ -409,6 +411,8 @@ ngx_hkdf_extract(u_char *out_key, size_t *out_len, const EVP_MD *digest, goto failed; } + EVP_PKEY_CTX_free(pctx); + return NGX_OK; failed: |