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 2018/12/14 22:29:44 UTC

[qpid-dispatch] branch master updated: DISPATCH-1214 - Free the error object on second detaches

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 ccb8585  DISPATCH-1214 - Free the error object on second detaches
ccb8585 is described below

commit ccb8585011cdbce112ecdd3b3af4e300d30e5889
Author: Ganesh Murthy <gm...@redhat.com>
AuthorDate: Fri Dec 14 17:29:21 2018 -0500

    DISPATCH-1214 - Free the error object on second detaches
---
 src/router_core/core_link_endpoint.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/router_core/core_link_endpoint.c b/src/router_core/core_link_endpoint.c
index e1867f7..532188c 100644
--- a/src/router_core/core_link_endpoint.c
+++ b/src/router_core/core_link_endpoint.c
@@ -210,11 +210,15 @@ void qdrc_endpoint_do_detach_CT(qdr_core_t *core, qdrc_endpoint_t *ep, qdr_error
     if (ep->link->detach_count == 1) {
         if (!!ep->desc->on_first_detach)
             ep->desc->on_first_detach(ep->link_context, error);
-        else
+        else {
             qdr_link_outbound_detach_CT(core, ep->link, 0, QDR_CONDITION_NONE, true);
+            qdr_error_free(error);
+        }
     } else {
         if (!!ep->desc->on_second_detach)
             ep->desc->on_second_detach(ep->link_context, error);
+        else
+            qdr_error_free(error);
         ep->link->core_endpoint = 0;
         free_qdrc_endpoint_t(ep);
     }


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