]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_odbc_cdr] scan-build: Fix dereference of null pointer and a dead assignment. 424/head
authorAndrey Volk <andywolk@gmail.com>
Tue, 25 Feb 2020 20:58:51 +0000 (00:58 +0400)
committerAndrey Volk <andywolk@gmail.com>
Tue, 25 Feb 2020 20:58:51 +0000 (00:58 +0400)
src/mod/event_handlers/mod_odbc_cdr/mod_odbc_cdr.c

index 1ca10a72d7543ffb9d4c9fa7fd7cc0688a31d1cc..a2b00e193a4df7758aa1ca1535b3808884c5448e 100644 (file)
@@ -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) {