summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-04-26 07:48:40 -0300
committerJoshua Colp <jcolp@digium.com>2016-04-26 05:52:43 -0500
commit6959f5484b3077c6cced3477dda6fe04cfb86cb9 (patch)
tree672e6a417cdcbdad11493bb82d685a51012ec444 /apps
parent9d8f59aaf286c2177cdc051e25a50b05bfeacb44 (diff)
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
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1df8b697c..dbd83938d 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -10854,8 +10854,9 @@ static int unload_module(void)
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;
}