diff src/event/quic/ngx_event_quic.c @ 9172:4ccb0d973206

QUIC: reusing crypto contexts for packet protection.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 20 Oct 2023 18:05:07 +0400
parents ff98ae7d261e
children ff452f283aa9
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic.c
+++ b/src/event/quic/ngx_event_quic.c
@@ -335,6 +335,7 @@ ngx_quic_new_connection(ngx_connection_t
     qc->validated = pkt->validated;
 
     if (ngx_quic_open_sockets(c, qc, pkt) != NGX_OK) {
+        ngx_quic_keys_cleanup(qc->keys);
         return NULL;
     }
 
@@ -585,6 +586,8 @@ ngx_quic_close_connection(ngx_connection
 
     ngx_quic_close_sockets(c);
 
+    ngx_quic_keys_cleanup(qc->keys);
+
     ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic close completed");
 
     /* may be tested from SSL callback during SSL shutdown */