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/11/04 22:33:32 UTC
[qpid-dispatch] branch dev-protocol-adaptors-2 updated:
DISPATCH-1776: Check for presence of next_stream_data before trying to free
it
This is an automated email from the ASF dual-hosted git repository.
gmurthy pushed a commit to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by this push:
new 2f4db21 DISPATCH-1776: Check for presence of next_stream_data before trying to free it
2f4db21 is described below
commit 2f4db21b910d432c67874ca730b3f57bd748d543
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Wed Nov 4 17:32:39 2020 -0500
DISPATCH-1776: Check for presence of next_stream_data before trying to free it
---
src/adaptors/http2/http2_adaptor.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/adaptors/http2/http2_adaptor.c b/src/adaptors/http2/http2_adaptor.c
index 9895ba0..74a4d9f 100644
--- a/src/adaptors/http2/http2_adaptor.c
+++ b/src/adaptors/http2/http2_adaptor.c
@@ -1006,8 +1006,10 @@ ssize_t read_data_callback(nghttp2_session *session,
*data_flags |= NGHTTP2_DATA_FLAG_EOF;
stream_data->out_msg_body_sent = true;
stream_data->full_payload_handled = true;
- qd_message_stream_data_release(stream_data->next_stream_data);
- stream_data->next_stream_data = 0;
+ if (stream_data->next_stream_data) {
+ qd_message_stream_data_release(stream_data->next_stream_data);
+ stream_data->next_stream_data = 0;
+ }
stream_data->out_dlv_local_disposition = PN_ACCEPTED;
if ((*data_flags & NGHTTP2_DATA_FLAG_EOF) && conn->ingress) {
_http_record_request(conn, stream_data);
@@ -1473,9 +1475,10 @@ uint64_t handle_outgoing_http(qdr_http2_stream_data_t *stream_data)
if (payload_length == 0) {
stream_data->next_stream_data_result = qd_message_next_stream_data(message, &stream_data->next_stream_data);
if (stream_data->next_stream_data_result == QD_MESSAGE_STREAM_DATA_NO_MORE) {
-
- qd_message_stream_data_release(stream_data->next_stream_data);
- stream_data->next_stream_data = 0;
+ if (stream_data->next_stream_data) {
+ qd_message_stream_data_release(stream_data->next_stream_data);
+ stream_data->next_stream_data = 0;
+ }
qd_message_stream_data_release(stream_data->curr_stream_data);
stream_data->curr_stream_data = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org