From 4f48835575ab25f5bf2b2ba03ae5a5014f776fd0 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Sun, 1 Oct 2023 13:54:58 +0300 Subject: [PATCH] [Core] Coverity: 1024236 Dereference before null check --- src/switch_ivr_originate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 4a3cbc64f1..ed07a964a9 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -1305,7 +1305,7 @@ static switch_status_t setup_ringback(originate_global_t *oglobals, originate_st } } - if (oglobals->session && (read_codec = switch_core_session_get_read_codec(oglobals->session))) { + if ((read_codec = switch_core_session_get_read_codec(oglobals->session))) { if (ringback_data && switch_is_file_path(ringback_data)) { if (!(strrchr(ringback_data, '.') || strstr(ringback_data, SWITCH_URL_SEPARATOR))) { ringback->asis++;