You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/09/09 15:38:26 UTC

[qpid-dispatch] branch master updated: DISPATCH-1766: Fix memory leak found by Coverity

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

chug 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 9ceab01  DISPATCH-1766: Fix memory leak found by Coverity
9ceab01 is described below

commit 9ceab019b3b26259df7e553e19262a8c3a50181b
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Wed Sep 9 11:37:54 2020 -0400

    DISPATCH-1766: Fix memory leak found by Coverity
---
 src/connection_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/connection_manager.c b/src/connection_manager.c
index a73287f..aa95417 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -393,10 +393,11 @@ static qd_error_t load_server_config(qd_dispatch_t *qd, qd_server_config_t *conf
     config->policy_vhost         = qd_entity_opt_string(entity, "policyVhost", 0);    CHECK();
     config->conn_props           = qd_entity_opt_map(entity, "openProperties");       CHECK();
 
-    const char *unused           = qd_entity_opt_string(entity, "trustedCertsFile", 0);
+    char *unused                 = qd_entity_opt_string(entity, "trustedCertsFile", 0);
     if (unused) {
         qd_log(qd->connection_manager->log_source, QD_LOG_WARNING,
                "Configuration listener attribute 'trustedCertsFile' is not used. Specify sslProfile caCertFile instead.");
+        free(unused);
     }
 
     set_config_host(config, entity);


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