]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_spandsp] Coverity CID 1024263 (Dereference before null check) 2106/head
authorAndrey Volk <andywolk@gmail.com>
Thu, 1 Jun 2023 14:24:37 +0000 (17:24 +0300)
committerDragos Oancea <dragos@signalwire.com>
Fri, 9 Jun 2023 09:18:19 +0000 (12:18 +0300)
src/mod/applications/mod_spandsp/mod_spandsp_modem.c

index 560a78be444c30f706933063dc53fe096fc5e20e..1f8a88cc75ee6e4560ebf958bd9e96e2d2059790 100644 (file)
@@ -897,9 +897,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
 
        fail:
 
-               if (new_session) {
-                       switch_core_session_destroy(new_session);
-               }
+               switch_core_session_destroy(new_session);
 
                if (modem) {
                        modem_set_state(modem, MODEM_STATE_ONHOOK);