diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2023-10-20 18:05:07 +0400 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2023-10-20 18:05:07 +0400 |
| commit | 80a695add847f78b93dfb1b09aeb5562a2558d2a (patch) | |
| tree | 0000a526d3b1e9bd228dfa1e9496ded96cca05e4 /src/event/quic/ngx_event_quic_output.c | |
| parent | 885a02696e689ea422256d58891276499c7da56f (diff) | |
| download | nginx-80a695add847f78b93dfb1b09aeb5562a2558d2a.tar.gz nginx-80a695add847f78b93dfb1b09aeb5562a2558d2a.tar.bz2 | |
QUIC: reusing crypto contexts for packet protection.
Diffstat (limited to 'src/event/quic/ngx_event_quic_output.c')
| -rw-r--r-- | src/event/quic/ngx_event_quic_output.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index bd3e7e3b0..dd528a7fe 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -941,13 +941,17 @@ ngx_quic_send_early_cc(ngx_connection_t *c, ngx_quic_header_t *inpkt, res.data = dst; if (ngx_quic_encrypt(&pkt, &res) != NGX_OK) { + ngx_quic_keys_cleanup(pkt.keys); return NGX_ERROR; } if (ngx_quic_send(c, res.data, res.len, c->sockaddr, c->socklen) < 0) { + ngx_quic_keys_cleanup(pkt.keys); return NGX_ERROR; } + ngx_quic_keys_cleanup(pkt.keys); + return NGX_DONE; } |
