[asterisk-commits] app queue: Fix crash when unloading module. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 26 10:44:34 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: app_queue: Fix crash when unloading module.
......................................................................


app_queue: Fix crash when unloading module.

When unloading the app_queue module the members in each queue are
destroyed and as part of this they are removed from the pending
members container. Unfortunately a crash would occur as the container
was destroyed before the members were removed.

This change tweaks ordering so the container destruction occurs
after the members are destroyed.

ASTERISK-16115

Change-Id: I48c728668c55aee3d05b751a5d450fb57e87f44b
---
M apps/app_queue.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved
  George Joseph: Looks good to me, but someone else must approve



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 927c496..8171d11 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -10983,8 +10983,9 @@
 	ast_extension_state_del(0, extension_state_cb);
 
 	ast_unload_realtime("queue_members");
-	ao2_cleanup(pending_members);
 	ao2_cleanup(queues);
+	ao2_cleanup(pending_members);
+
 	queues = NULL;
 	return 0;
 }

-- 
To view, visit https://gerrit.asterisk.org/2705
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48c728668c55aee3d05b751a5d450fb57e87f44b
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list