You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2015/06/19 15:13:10 UTC

qpid-proton git commit: PROTON-905: fix leak of session/links when not using events

Repository: qpid-proton
Updated Branches:
  refs/heads/master bcfa8d44b -> 653f4e5fe


PROTON-905: fix leak of session/links when not using events


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/653f4e5f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/653f4e5f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/653f4e5f

Branch: refs/heads/master
Commit: 653f4e5fe2b9307dccced0a5a85028d1ca67c66a
Parents: bcfa8d4
Author: Ken Giusti <kg...@apache.org>
Authored: Thu Jun 11 08:35:11 2015 -0400
Committer: Ken Giusti <kg...@apache.org>
Committed: Fri Jun 19 08:38:43 2015 -0400

----------------------------------------------------------------------
 proton-c/src/engine/engine.c | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/653f4e5f/proton-c/src/engine/engine.c
----------------------------------------------------------------------
diff --git a/proton-c/src/engine/engine.c b/proton-c/src/engine/engine.c
index 936cf60..fda719a 100644
--- a/proton-c/src/engine/engine.c
+++ b/proton-c/src/engine/engine.c
@@ -757,6 +757,14 @@ void pn_clear_modified(pn_connection_t *connection, pn_endpoint_t *endpoint)
     endpoint->transport_next = NULL;
     endpoint->transport_prev = NULL;
     endpoint->modified = false;
+    // PROTON-905: the endpoint object's finalize can be blocked when it is on
+    // the modified list (see pni_preserve_child() - the endpoint is considered
+    // 'bound').  This increment/decrement will re-run the finalize in this
+    // case.
+    if (endpoint != &connection->endpoint) {
+        pn_incref(endpoint);
+        pn_decref(endpoint);
+    }
   }
 }
 


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