From 118b26578cd64709a0dd07be6431af53c16ea037 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Fri, 31 Jan 2020 23:17:08 +0000 Subject: [PATCH] [sofia-sip] scan-build: Access to field 'c_address' results in a dereference of a null pointer (loaded from variable 'c') --- libs/sofia-sip/libsofia-sip-ua/soa/soa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/soa/soa.c b/libs/sofia-sip/libsofia-sip-ua/soa/soa.c index 0b838a15a2..bd1466fc6d 100644 --- a/libs/sofia-sip/libsofia-sip-ua/soa/soa.c +++ b/libs/sofia-sip/libsofia-sip-ua/soa/soa.c @@ -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; }