You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2021/03/17 15:50:08 UTC
[qpid-dispatch] branch master updated: DISPATCH-1723: Free any
link_work items still in the link->work_list and free that associated error
object as well. This closes #1067.
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 6f82fe7 DISPATCH-1723: Free any link_work items still in the link->work_list and free that associated error object as well. This closes #1067.
6f82fe7 is described below
commit 6f82fe707259118adbfb988adebfca10c386dc5a
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Tue Mar 9 17:24:05 2021 -0500
DISPATCH-1723: Free any link_work items still in the link->work_list and free that associated error object as well. This closes #1067.
---
src/router_core/router_core.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/router_core/router_core.c b/src/router_core/router_core.c
index b1ad331..0f83c1f 100644
--- a/src/router_core/router_core.c
+++ b/src/router_core/router_core.c
@@ -234,6 +234,21 @@ void qdr_core_free(qdr_core_t *core)
free(link->insert_prefix);
free(link->strip_prefix);
link->name = 0;
+
+ //
+ // If there are still any work items remaining in the link->work_list
+ // remove them and free the associated link_work->error
+ //
+ sys_mutex_lock(link->conn->work_lock);
+ qdr_link_work_t *link_work = DEQ_HEAD(link->work_list);
+ while (link_work) {
+ DEQ_REMOVE_HEAD(link->work_list);
+ qdr_error_free(link_work->error);
+ free_qdr_link_work_t(link_work);
+ link_work = DEQ_HEAD(link->work_list);
+ }
+ sys_mutex_unlock(link->conn->work_lock);
+
free_qdr_link_t(link);
link = DEQ_HEAD(core->open_links);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org