qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject [qpid-dispatch] branch master updated: DISPATCH-1510: cleanup qdr_error_t on shutdown
Date Tue, 07 Jan 2020 14:08:27 GMT
This is an automated email from the ASF dual-hosted git repository.

kgiusti 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 730e9f3  DISPATCH-1510: cleanup qdr_error_t on shutdown
730e9f3 is described below

commit 730e9f3b8f7e9363d35df5d2a5d22b940b73ec40
Author: Kenneth Giusti <kgiusti@apache.org>
AuthorDate: Wed Dec 4 10:24:51 2019 -0500

    DISPATCH-1510: cleanup qdr_error_t on shutdown
    
    This closes #652
---
 src/router_core/connections.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index 29d9e06..0a710d0 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -1757,13 +1757,16 @@ static void qdr_link_inbound_second_attach_CT(qdr_core_t *core, qdr_action_t
*ac
 
 static void qdr_link_inbound_detach_CT(qdr_core_t *core, qdr_action_t *action, bool discard)
 {
-    qdr_connection_t *conn = safe_deref_qdr_connection_t(action->args.connection.conn);
-    qdr_link_t       *link = safe_deref_qdr_link_t(action->args.connection.link);
-    if (discard || !conn || !link)
-        return;
-
+    qdr_connection_t *conn  = safe_deref_qdr_connection_t(action->args.connection.conn);
+    qdr_link_t       *link  = safe_deref_qdr_link_t(action->args.connection.link);
     qdr_error_t      *error = action->args.connection.error;
     qd_detach_type_t  dt    = action->args.connection.dt;
+
+    if (discard || !conn || !link) {
+        qdr_error_free(error);
+        return;
+    }
+
     qdr_address_t    *addr  = link->owning_addr;
 
     if (link->detach_received)


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


Mime
View raw message