diff src/event/quic/ngx_event_quic_output.c @ 9025:e50f77a2d0b0 quic

QUIC: removed ngx_quic_keys_new(). The ngx_quic_keys_t structure is now exposed.
author Vladimir Homutov <vl@nginx.com>
date Wed, 27 Jul 2022 17:31:16 +0400
parents f2925c80401c
children 3550b00d9dc8
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_output.c
+++ b/src/event/quic/ngx_event_quic_output.c
@@ -928,6 +928,7 @@ ngx_quic_send_early_cc(ngx_connection_t 
 {
     ssize_t            len;
     ngx_str_t          res;
+    ngx_quic_keys_t    keys;
     ngx_quic_frame_t   frame;
     ngx_quic_header_t  pkt;
 
@@ -956,10 +957,9 @@ ngx_quic_send_early_cc(ngx_connection_t 
         return NGX_ERROR;
     }
 
-    pkt.keys = ngx_quic_keys_new(c->pool);
-    if (pkt.keys == NULL) {
-        return NGX_ERROR;
-    }
+    ngx_memzero(&keys, sizeof(ngx_quic_keys_t));
+
+    pkt.keys = &keys;
 
     if (ngx_quic_keys_set_initial_secret(pkt.keys, &inpkt->dcid, c->log)
         != NGX_OK)