mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
chan_iax2.c: Avoid crash with IAX2 switch support.
A change made in 82cebaa0
did 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
This commit is contained in:
@@ -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