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
This commit is contained in:
Mark Michelson 2008-01-25 14:53:09 +00:00
parent 0b898073d1
commit 81fb790419
1 changed files with 2 additions and 2 deletions

View File

@ -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++;