From 716a9febc13a821c2dcb90b878ea30b49c1c1245 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Wed, 31 May 2023 15:58:19 +0300 Subject: [PATCH] [mod_portaudio] coverity CID 1024263 (Dereference before null check) --- src/mod/endpoints/mod_portaudio/mod_portaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 62eba524d3..acd578e2e2 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -1296,9 +1296,9 @@ error: } switch_mutex_unlock(endpoint->mutex); } - if (new_session && *new_session) { - switch_core_session_destroy(new_session); - } + + switch_core_session_destroy(new_session); + return retcause; }