kgiusti commented on a change in pull request #1248:
URL: https://github.com/apache/qpid-dispatch/pull/1248#discussion_r658931562
##########
File path: src/adaptors/http2/http2_adaptor.c
##########
@@ -359,11 +364,25 @@ static void
free_http2_stream_data(qdr_http2_stream_data_t *stream_data, bool on
qd_message_free(stream_data->message);
}
+ //
+ // If the client/server closed the connection abruptly, we need to release
the stream_data->curr_stream_data and
+ // stream_data->next_stream_data.
+ // This final decref of the delivery is going to free the associated
message but before this message can be freed
+ // all stream data (body data) objects need to be freed. We do this here.
+ //
if (stream_data->in_dlv && !stream_data->in_dlv_decrefed) {
+ if (stream_data->curr_stream_data)
+ qd_message_stream_data_release(stream_data->curr_stream_data);
+ if (stream_data->next_stream_data)
+ qd_message_stream_data_release(stream_data->next_stream_data);
qdr_delivery_decref(http2_adaptor->core, stream_data->in_dlv, "HTTP2
adaptor in_dlv - free_http2_stream_data");
}
if (stream_data->out_dlv && !stream_data->out_dlv_decrefed) {
+ if (stream_data->curr_stream_data)
+ qd_message_stream_data_release(stream_data->curr_stream_data);
Review comment:
could this have already been freed on line #375?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]