mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-22 14:34:09 -07:00
chan_iax2.c: Avoid crash with IAX2 switch support.
A change made in82cebaa0did not properly handle the case when a channel was not provided, triggering a crash. ast_check_hangup(...) does not protect against NULL pointers. Fixes #180 (cherry picked from commitd26a00ef34)
This commit is contained in:
committed by
Asterisk Development Team
parent
db8601dd77
commit
22f31ecedd
@@ -14323,7 +14323,7 @@ static struct iax2_dpcache *find_cache(struct ast_channel *chan, const char *dat
|
||||
ast_log(LOG_WARNING, "Timeout waiting for %s exten %s\n", data, exten);
|
||||
}
|
||||
|
||||
if (ast_check_hangup(chan)) {
|
||||
if (chan && ast_check_hangup(chan)) {
|
||||
doabort = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user