jiridanek commented on a change in pull request #880:
URL: https://github.com/apache/qpid-dispatch/pull/880#discussion_r542427758



##########
File path: src/dispatch.c
##########
@@ -371,6 +371,8 @@ void qd_dispatch_free(qd_dispatch_t *qd)
     qd_python_finalize();
     qd_dispatch_set_router_id(qd, NULL);
     qd_dispatch_set_router_area(qd, NULL);
+
+    free(qd);

Review comment:
       this is a funny issue; dispatch does not free this, but because there is 
a global variable pointing to the current qd_router_t, it is not detected as a 
leak; when I want to start the router multiple times in a single process, 
subsequent initializations overwrite the global, and the leak gets reported

##########
File path: src/connection_manager.c
##########
@@ -972,6 +972,8 @@ void qd_connection_manager_free(qd_connection_manager_t *cm)
         config_sasl_plugin_free(cm, saslp);
         saslp = DEQ_HEAD(cm->config_sasl_plugins);
     }
+
+    free(cm);

Review comment:
       this is a funny issue; dispatch does not free this, but because there is 
a global variable pointing to the current qd_router_t, it is not detected as a 
leak; when I want to start the router multiple times in a single process, 
subsequent initializations overwrite the global, and the leak gets reported




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to