Audit of ao2_iterator_init() usage for v10. Missed one.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 27 Jan 2012 21:38:54 +0000 (21:38 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 27 Jan 2012 21:38:54 +0000 (21:38 +0000)
........

Merged revisions 353039 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353040 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 84f0757..6557d51 100644 (file)
@@ -5549,12 +5549,11 @@ static int set_member_penalty(const char *queuename, const char *interface, int
 
                /* After hitting realtime queues, go back and get the regular ones. */
                queue_iter = ao2_iterator_init(queues, 0);
 
                /* After hitting realtime queues, go back and get the regular ones. */
                queue_iter = ao2_iterator_init(queues, 0);
-
                while ((q = ao2_t_iterator_next(&queue_iter, "Iterate through queues"))) {
                        foundqueue++;
                        foundinterface += set_member_penalty_help_members(q, interface, penalty);
                }
                while ((q = ao2_t_iterator_next(&queue_iter, "Iterate through queues"))) {
                        foundqueue++;
                        foundinterface += set_member_penalty_help_members(q, interface, penalty);
                }
-
+               ao2_iterator_destroy(&queue_iter);
        } else { /* We actually have a queuename, so we can just act on the single queue. */
                if ((q = find_load_queue_rt_friendly(queuename))) {
                        foundqueue++;
        } else { /* We actually have a queuename, so we can just act on the single queue. */
                if ((q = find_load_queue_rt_friendly(queuename))) {
                        foundqueue++;