/ fixes possibility for accessing of struct when null

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Ben Kramer 21 years ago
parent 79392ea53b
commit 20c26996ef

@ -1149,10 +1149,15 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
}
} else if (e->data == p->ring_timer_id) {
/* We didnt get another ring in time! */
if (p->owner){
if (p->owner->_state != AST_STATE_UP) {
/* Assume caller has hung up */
vpb_timer_stop(p->ring_timer);
}
} else {
/* No owner any more, Assume caller has hung up */
vpb_timer_stop(p->ring_timer);
}
}
break;

Loading…
Cancel
Save