Merge "AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request"

This commit is contained in:
George Joseph
2018-02-21 10:42:07 -06:00
committed by Gerrit Code Review

View File

@@ -4173,7 +4173,8 @@ int ast_sip_failover_request(pjsip_tx_data *tdata)
{
pjsip_via_hdr *via;
if (!tdata->dest_info.addr.count || (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1)) {
if (!tdata || !tdata->dest_info.addr.count
|| (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1)) {
/* No more addresses to try */
return 0;
}