[sofia-sip] scan-build: Access to field 'c_address' results in a dereference of a null pointer (loaded from variable 'c')

This commit is contained in:
Dragos Oancea 2020-01-31 23:17:08 +00:00
parent 8f8e74cae9
commit 118b26578c
1 changed files with 1 additions and 1 deletions

View File

@ -2639,7 +2639,7 @@ best_listed_address_in_session(sdp_session_t const *sdp,
for (m = sdp->sdp_media; m; m = m->m_next) {
if (m->m_connections && m->m_connections != sdp->sdp_connection) {
c = sdp->sdp_connection;
if (su_casenmatch(c->c_address, address, n) && c->c_address[n] == 0)
if (c && su_casenmatch(c->c_address, address, n) && c->c_address[n] == 0)
break;
c = NULL;
}