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 8dffff4 DISPATCH-1214 - Clean up qd_link_ref_t objects associated
with the link before freeing it
8dffff4 is described below
commit 8dffff4fb1f9c62e54b0dddcc3aa7f2b2b5ca10a
Author: Ganesh Murthy <[email protected]>
AuthorDate: Tue Dec 18 16:53:56 2018 -0500
DISPATCH-1214 - Clean up qd_link_ref_t objects associated with the link
before freeing it
---
src/container.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/container.c b/src/container.c
index c3a2361..12c89b9 100644
--- a/src/container.c
+++ b/src/container.c
@@ -880,6 +880,19 @@ void qd_link_free(qd_link_t *link)
sys_mutex_lock(container->lock);
DEQ_REMOVE(container->links, link);
sys_mutex_unlock(container->lock);
+
+
+ qd_link_ref_list_t *list = qd_link_get_ref_list(link);
+
+ if (list) {
+ qd_link_ref_t *link_ref = DEQ_HEAD (*list);
+ while (link_ref) {
+ DEQ_REMOVE_HEAD(*list);
+ free_qd_link_ref_t(link_ref);
+ link_ref = DEQ_HEAD (*list);
+ }
+ }
+
free_qd_link_t(link);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]