From aa89caa453973c6f9095337d4a3e5d3eafdb91e6 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Fri, 20 Sep 2019 19:32:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHTTP2=E6=B5=81close=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=BA=94=E7=AD=94=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=90=8C=E4=B8=80=E6=B5=81id=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E5=A6=A8=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/protocol/http2/src/http2_stream.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/protocol/http2/src/http2_stream.cpp b/plugin/protocol/http2/src/http2_stream.cpp index 8e99af4..08d85cd 100644 --- a/plugin/protocol/http2/src/http2_stream.cpp +++ b/plugin/protocol/http2/src/http2_stream.cpp @@ -760,6 +760,7 @@ nghttp2_frame_submit_built_resp(struct tfe_h2_stream *h2_stream_info, if (rv != 0){ return ACTION_FORWARD_DATA; } + delete_nv_packet_data(h2_header); return ACTION_DROP_DATA; } @@ -804,6 +805,7 @@ nghttp2_frame_submit_built_req(struct tfe_h2_stream *h2_stream_info, nghttp2_strerror(stream_id)); return ACTION_FORWARD_DATA; } + delete_nv_packet_data(h2_header); return ACTION_DROP_DATA; } @@ -1193,6 +1195,7 @@ nghttp2_submit_header_by_not_modify(struct tfe_h2_stream *h2_stream_info, printf("Fatal headers error: %s\n", nghttp2_strerror(stream_id)); stream_action = ACTION_FORWARD_DATA; } + delete_nv_packet_data(&headers); if (stream_action == ACTION_DROP_DATA){ xret = nghttp2_session_send(h2_stream_info->as_server); @@ -1382,6 +1385,7 @@ nghttp2_server_frame_submit_push_promise(struct tfe_h2_stream *h2_stream_info, } upstream_create_req(h2_stream_info, h2_stream_info->as_server, peer_h2_stream, stream_id); /*clean header message **/ + delete_nv_packet_data(headers); stream_action = ACTION_DROP_DATA; finish: return stream_action; @@ -1590,6 +1594,7 @@ nghttp2_server_frame_submit_header(struct tfe_h2_stream *h2_stream_info, if (xret < 0){ printf("Fatal headers error: %s\n", nghttp2_strerror(xret)); } + delete_nv_packet_data(headers); return stream_action; } @@ -1773,6 +1778,7 @@ nghttp2_client_frame_submit_header(struct tfe_h2_stream *h2_stream_info, } stream_action = ACTION_DROP_DATA; finish: + delete_nv_packet_data(headers); return stream_action; }