You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2017/05/01 16:13:53 UTC

qpid-proton git commit: PROTON-1460: epoll proactor listener resorce cleanup

Repository: qpid-proton
Updated Branches:
  refs/heads/master aed709ded -> 6995cfd63


PROTON-1460: epoll proactor listener resorce cleanup


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

Branch: refs/heads/master
Commit: 6995cfd63cdebf252a644d38c4351d2441fc20d5
Parents: aed709d
Author: Clifford Jansen <cl...@apache.org>
Authored: Mon May 1 09:13:37 2017 -0700
Committer: Clifford Jansen <cl...@apache.org>
Committed: Mon May 1 09:13:37 2017 -0700

----------------------------------------------------------------------
 proton-c/src/proactor/epoll.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/6995cfd6/proton-c/src/proactor/epoll.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c
index ec3a862..6ea61c7 100644
--- a/proton-c/src/proactor/epoll.c
+++ b/proton-c/src/proactor/epoll.c
@@ -1104,6 +1104,7 @@ void pn_proactor_listen(pn_proactor_t *p, pn_listener_t *l, const char *addr, in
             start_polling(&l->psocket.epoll_io, l->psocket.proactor->epollfd);  // TODO: check for error
             unlock(&l->context.mutex);
             if (notify) wake_notify(&l->context);
+            freeaddrinfo(ai);
             free(buf);
             return;
           }
@@ -1133,8 +1134,8 @@ void pn_listener_free(pn_listener_t *l) {
   // TODO: do we need a QPID DeletionManager equivalent to be safe from inbound connection (accept) epoll events?
   if (l) {
     if (l->collector) pn_collector_free(l->collector);
-    if (!l->condition) pn_condition_free(l->condition);
-    if (!l->attachments) pn_free(l->attachments);
+    if (l->condition) pn_condition_free(l->condition);
+    if (l->attachments) pn_free(l->attachments);
     lock(&l->context.mutex);
     bool can_free = proactor_remove(&l->psocket);
     unlock(&l->context.mutex);


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