You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2020/08/31 16:35:08 UTC

[qpid-dispatch] branch dev-protocol-adaptors updated: DISPATCH-1743: Fixed crash due to stream closure. Also fixed a couple of iterator and parse object leaks

This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch dev-protocol-adaptors
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors by this push:
     new a6a1e3a  DISPATCH-1743: Fixed crash due to stream closure. Also fixed a couple of iterator and parse object leaks
a6a1e3a is described below

commit a6a1e3a93c4a7881a1438ff7400a7281042f9efb
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Mon Aug 31 12:34:05 2020 -0400

    DISPATCH-1743: Fixed crash due to stream closure. Also fixed a couple of iterator and parse object leaks
---
 src/adaptors/http2/http2_adaptor.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/adaptors/http2/http2_adaptor.c b/src/adaptors/http2/http2_adaptor.c
index 99f6748..ea3ac0a 100644
--- a/src/adaptors/http2/http2_adaptor.c
+++ b/src/adaptors/http2/http2_adaptor.c
@@ -143,10 +143,11 @@ qd_composed_field_t  *qd_message_compose_amqp(qd_message_t *msg,
 static void free_http2_stream_data(qdr_http2_stream_data_t *stream_data)
 {
     qdr_http2_session_data_t *session_data = stream_data->session_data;
+    qdr_http2_connection_t *conn = session_data->conn;
     stream_data->session_data = 0;
-    if (stream_data->in_link)
+    if (conn->qdr_conn && stream_data->in_link)
         qdr_link_detach(stream_data->in_link, QD_CLOSED, 0);
-    if (stream_data->out_link)
+    if (conn->qdr_conn && stream_data->out_link)
         qdr_link_detach(stream_data->out_link, QD_CLOSED, 0);
     free(stream_data->reply_to);
     qd_compose_free(stream_data->app_properties);
@@ -1017,6 +1018,9 @@ uint64_t handle_outgoing_http(qdr_http2_stream_data_t *stream_data)
 
             nghttp2_session_send(session_data->session);
             qd_log(http_adaptor->protocol_log_source, QD_LOG_TRACE, "[C%i][S%i] Headers submitted", conn->conn_id, stream_data->stream_id);
+
+            qd_iterator_free(app_properties_iter);
+            qd_parse_free(app_properties_fld);
         }
         else {
             qd_log(http_adaptor->protocol_log_source, QD_LOG_TRACE, "[C%i][S%i] Headers already submitted, Proceeding with the body", conn->conn_id, stream_data->stream_id);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org