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 2021/03/11 19:11:07 UTC

[qpid-dispatch] branch master updated: DISPATCH-1996: Check the discard flag before continuing with freeing the connection. The connection most certainly is already freed by adaptor_final

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4bf5477  DISPATCH-1996: Check the discard flag before continuing with freeing the connection. The connection most certainly is already freed by adaptor_final
4bf5477 is described below

commit 4bf5477df2472c411ae20d75440db1705b678585
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Thu Mar 11 13:54:26 2021 -0500

    DISPATCH-1996: Check the discard flag before continuing with freeing the connection. The connection most certainly is already freed by adaptor_final
---
 src/adaptors/http2/http2_adaptor.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/adaptors/http2/http2_adaptor.c b/src/adaptors/http2/http2_adaptor.c
index 7ffdb0d..db7261c 100644
--- a/src/adaptors/http2/http2_adaptor.c
+++ b/src/adaptors/http2/http2_adaptor.c
@@ -2049,6 +2049,14 @@ static void restart_streams(qdr_http2_connection_t *http_conn)
 
 static void qdr_del_http2_connection_CT(qdr_core_t *core, qdr_action_t *action, bool discard)
 {
+    //
+    // DISPATCH-1996: discard is true in the case where this action is called from qdr_core_free()
+    // This means that the qdr_adaptors_finalize has already been called and the connection in question has already been freed.
+    // No need to do anything now, if discard, just return.
+    //
+    if (discard)
+        return;
+
     qdr_http2_connection_t *conn = (qdr_http2_connection_t*) action->args.general.context_1;
     free_qdr_http2_connection(conn, false);
 }


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