app_queue: Cleanup ao2_iterator
authorCorey Farrell <git@cfware.com>
Tue, 28 Oct 2014 11:22:55 +0000 (11:22 +0000)
committerCorey Farrell <git@cfware.com>
Tue, 28 Oct 2014 11:22:55 +0000 (11:22 +0000)
Clean ao2_iterator, resolving reference leak to queue members.

ASTERISK-24454 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4111/
........

Merged revisions 426255 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 426260 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 426266 from http://svn.asterisk.org/svn/asterisk/branches/13

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

apps/app_queue.c

index 0540ee5..4d4449f 100644 (file)
@@ -3537,6 +3537,7 @@ static void update_realtime_members(struct call_queue *q)
                        }
                        ao2_ref(m, -1);
                }
+               ao2_iterator_destroy(&mem_iter);
                ast_debug(3, "Queue %s has no realtime members defined. No need for update\n", q->name);
                ao2_unlock(q);
                return;