From: Mark Michelson Date: Fri, 25 Jan 2008 14:53:09 +0000 (+0000) Subject: Insure that we are not going to pass a NULL pointer to add_to_interfaces. X-Git-Tag: 1.6.0-beta2~2^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fb790419bd1f24df4b28dfdc3636abe0d51449;p=thirdparty%2Fasterisk.git Insure that we are not going to pass a NULL pointer to add_to_interfaces. (closes issue #11840) Reported by: junky git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100344 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index a6b2d3f89e..547132b6a8 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1306,7 +1306,7 @@ static void rt_handle_member_record(struct call_queue *q, char *interface, const if ((m = create_queue_member(interface, membername, penalty, paused, state_interface))) { m->dead = 0; m->realtime = 1; - add_to_interfaces(state_interface); + add_to_interfaces(m->state_interface); ao2_link(q->members, m); ao2_ref(m, -1); m = NULL; @@ -3708,7 +3708,7 @@ static int add_to_queue(const char *queuename, const char *interface, const char ao2_lock(q); if ((old_member = interface_exists(q, interface)) == NULL) { if ((new_member = create_queue_member(interface, membername, penalty, paused, state_interface))) { - add_to_interfaces(state_interface); + add_to_interfaces(new_member->state_interface); new_member->dynamic = 1; ao2_link(q->members, new_member); q->membercount++;