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

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


The following commit(s) were added to refs/heads/main by this push:
     new d5cec53  DISPATCH-2207: fix qd_connection_t leak
d5cec53 is described below

commit d5cec5305768dbabb7b7411c66c0fb9bc68be4b6
Author: Kenneth Giusti <kgiu...@apache.org>
AuthorDate: Wed Jul 21 17:09:51 2021 -0400

    DISPATCH-2207: fix qd_connection_t leak
    
    This closes #1310
---
 src/server.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/server.c b/src/server.c
index 24e73ee..82ad1f3 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1352,9 +1352,12 @@ static void try_open_cb(void *context)
         // else deleted or failed - on failed wait until after connection is 
freed
         // and state is set to CXTR_STATE_CONNECTING (timer is rescheduled 
then)
         try_open_lh(ct, ctx);
+        ctx = 0;  // owned by ct
     }
 
     sys_mutex_unlock(ct->lock);
+
+    free_qd_connection_t(ctx);  // noop if ctx == 0
 }
 
 

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

Reply via email to