qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject [qpid-dispatch] branch master updated: DISPATCH-1214 - Additional valgrind related fixes. Freed terminus and error objects
Date Mon, 17 Dec 2018 22:01:17 GMT
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 c266393  DISPATCH-1214 - Additional valgrind related fixes. Freed terminus and error
objects
c266393 is described below

commit c266393062a326ce8900ef1a27e11fe6aa592760
Author: Ganesh Murthy <gmurthy@redhat.com>
AuthorDate: Mon Dec 17 17:01:04 2018 -0500

    DISPATCH-1214 - Additional valgrind related fixes. Freed terminus and error objects
---
 .../modules/address_lookup_server/address_lookup_server.c  |  2 ++
 .../modules/edge_addr_tracking/edge_addr_tracking.c        |  2 ++
 src/router_core/router_core.c                              | 14 ++++++++++++++
 3 files changed, 18 insertions(+)

diff --git a/src/router_core/modules/address_lookup_server/address_lookup_server.c b/src/router_core/modules/address_lookup_server/address_lookup_server.c
index cde606f..7067aa7 100644
--- a/src/router_core/modules/address_lookup_server/address_lookup_server.c
+++ b/src/router_core/modules/address_lookup_server/address_lookup_server.c
@@ -282,6 +282,8 @@ static void _on_first_attach(void            *bind_context,
         qd_log(_server_state.core->log, QD_LOG_ERROR,
                "Attempt to attach to address lookup server rejected (container=%s)",
                (conn->connection_info) ? conn->connection_info->container : "<unknown>");
+        qdr_terminus_free(remote_source);
+        qdr_terminus_free(remote_target);
         return;
     }
 
diff --git a/src/router_core/modules/edge_addr_tracking/edge_addr_tracking.c b/src/router_core/modules/edge_addr_tracking/edge_addr_tracking.c
index 50e994a..a7ea0a7 100644
--- a/src/router_core/modules/edge_addr_tracking/edge_addr_tracking.c
+++ b/src/router_core/modules/edge_addr_tracking/edge_addr_tracking.c
@@ -121,6 +121,8 @@ static void qdrc_address_endpoint_first_attach(void              *bind_context,
         //
         *link_context = 0;
         qdrc_endpoint_detach_CT(bc->core, endpoint, 0);
+        qdr_terminus_free(remote_source);
+        qdr_terminus_free(remote_target);
     }
 }
 
diff --git a/src/router_core/router_core.c b/src/router_core/router_core.c
index 28649ad..a86038f 100644
--- a/src/router_core/router_core.c
+++ b/src/router_core/router_core.c
@@ -163,6 +163,20 @@ void qdr_core_free(qdr_core_t *core)
         qdr_router_node_free(core, rnode);
     }
 
+    qdr_link_t *link = DEQ_HEAD(core->open_links);
+    while (link) {
+        DEQ_REMOVE_HEAD(core->open_links);
+        free(link->name);
+        free(link->disambiguated_name);
+        free(link->terminus_addr);
+        free(link->ingress_histogram);
+        free(link->insert_prefix);
+        free(link->strip_prefix);
+        link->name = 0;
+        free_qdr_link_t(link);
+        link = DEQ_HEAD(core->open_links);
+    }
+
     qdr_connection_t *conn = DEQ_HEAD(core->open_connections);
     while (conn) {
         DEQ_REMOVE_HEAD(core->open_connections);


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


Mime
View raw message