Merge pull request #301 from dragos-oancea/sofia-soa-nullptr

[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:
Andrey Volk 2020-02-12 00:52:28 +04:00 committed by GitHub
commit 3217ff14c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}