]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't allocate space for queue members unless it's needed. You end up deleting dynami...
authorMark Michelson <mmichelson@digium.com>
Thu, 4 Oct 2007 21:57:03 +0000 (21:57 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 4 Oct 2007 21:57:03 +0000 (21:57 +0000)
closes issue (#10879, reported by dazza76, patched by me)

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

apps/app_queue.c

index a7de4ba98a7e1d64a2346231b68a9d8200f099ad..38ebedad807cf3782424da419ae713c94add411f 100644 (file)
@@ -722,7 +722,8 @@ static void init_queue(struct call_queue *q)
        q->context[0] = '\0';
        q->monfmt[0] = '\0';
        q->periodicannouncefrequency = 0;
-       q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
+       if(!q->members)
+               q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
        q->membercount = 0;
        q->found = 1;
        ast_copy_string(q->sound_next, "queue-youarenext", sizeof(q->sound_next));