From: Andrey Volk Date: Tue, 25 Feb 2020 20:58:51 +0000 (+0400) Subject: [mod_odbc_cdr] scan-build: Fix dereference of null pointer and a dead assignment. X-Git-Tag: v1.10.3^2~116^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F424%2Fhead;p=thirdparty%2Ffreeswitch.git [mod_odbc_cdr] scan-build: Fix dereference of null pointer and a dead assignment. --- diff --git a/src/mod/event_handlers/mod_odbc_cdr/mod_odbc_cdr.c b/src/mod/event_handlers/mod_odbc_cdr/mod_odbc_cdr.c index 1ca10a72d7..a2b00e193a 100644 --- a/src/mod/event_handlers/mod_odbc_cdr/mod_odbc_cdr.c +++ b/src/mod/event_handlers/mod_odbc_cdr/mod_odbc_cdr.c @@ -224,7 +224,6 @@ static void write_cdr(const char *path, const char *log_line) wrote += write(fd, "\n", 1); wrote++; close(fd); - fd = -1; } } @@ -283,7 +282,7 @@ static switch_status_t odbc_cdr_reporting(switch_core_session_t *session) if (!table) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Table [%s] not found, ignoring leg\n", table_name); - skip_leg = SWITCH_TRUE; + continue; } if (table->log_leg == ODBC_CDR_LOG_A && is_b) {