qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [78/89] [abbrv] qpid-proton git commit: PROTON-1844: Windows proactor memory corruption fix (from epoll fix PROTON-1773)
Date Tue, 03 Jul 2018 22:14:07 GMT
PROTON-1844: Windows proactor memory corruption fix (from epoll fix PROTON-1773)


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

Branch: refs/heads/go1
Commit: cd2783fae628cec6b789bf03c5b173ad933d50f1
Parents: 8e65759
Author: Clifford Jansen <cliffjansen@apache.org>
Authored: Sat May 12 17:53:33 2018 -0700
Committer: Clifford Jansen <cliffjansen@apache.org>
Committed: Sat May 12 17:53:33 2018 -0700

----------------------------------------------------------------------
 c/src/proactor/win_iocp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cd2783fa/c/src/proactor/win_iocp.c
----------------------------------------------------------------------
diff --git a/c/src/proactor/win_iocp.c b/c/src/proactor/win_iocp.c
index e41ac5b..59194c6 100644
--- a/c/src/proactor/win_iocp.c
+++ b/c/src/proactor/win_iocp.c
@@ -3350,7 +3350,10 @@ void pn_proactor_disconnect(pn_proactor_t *p, pn_condition_t *cond)
{
   }
 
   // Second pass: different locking, close the pcontexts, free them if !disconnect_ops
-  for (ctx = disconnecting_pcontexts; ctx; ctx = ctx ? ctx->next : NULL) {
+  pcontext_t *next = disconnecting_pcontexts;
+  while (next) {
+    ctx = next;
+    next = ctx->next;           /* Save next pointer in case we free ctx */
     bool do_free = false;
     pconnection_t *pc = pcontext_pconnection(ctx);
     pn_listener_t *l = pc ? NULL : pcontext_listener(ctx);


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


Mime
View raw message