aboutsummaryrefslogtreecommitdiff
path: root/src/event/ngx_event_quic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event_quic.c')
-rw-r--r--src/event/ngx_event_quic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index c6a249b42..aff89b01d 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -3839,6 +3839,7 @@ ngx_quic_send_frames(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
len = ngx_quic_create_frame(p, f);
if (len == -1) {
+ ngx_quic_free_frames(c, frames);
return NGX_ERROR;
}
@@ -3897,11 +3898,13 @@ ngx_quic_send_frames(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx,
pkt.num_len, pkt.trunc);
if (ngx_quic_encrypt(&pkt, ssl_conn, &res) != NGX_OK) {
+ ngx_quic_free_frames(c, frames);
return NGX_ERROR;
}
len = c->send(c, res.data, res.len);
if (len == NGX_ERROR || (size_t) len != res.len) {
+ ngx_quic_free_frames(c, frames);
return NGX_ERROR;
}