From: Dragos Oancea Date: Wed, 31 May 2023 13:08:17 +0000 (+0300) Subject: [mod_sofia] coverity CID 1024254 (Dereference before null check) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525e12a1461e40b249f6ca0ba5374b5021d57f3e;p=thirdparty%2Ffreeswitch.git [mod_sofia] coverity CID 1024254 (Dereference before null check) --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 7c6f42f38b..febc65de75 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -472,7 +472,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session) switch_core_hash_delete_locked(tech_pvt->profile->chat_hash, tech_pvt->hash_key, tech_pvt->profile->flag_mutex); } - if (session && tech_pvt->profile->pres_type) { + if (tech_pvt->profile->pres_type) { char *sql = switch_mprintf("delete from sip_dialogs where uuid='%q'", switch_core_session_get_uuid(session)); switch_assert(sql); sofia_glue_execute_sql_now(tech_pvt->profile, &sql, SWITCH_TRUE);