Merge pull request #424 from signalwire/mod_odbc_cdr

[mod_odbc_cdr] scan-build: Fix dereference of null pointer and a dead assignment.
This commit is contained in:
Andrey Volk 2020-02-26 23:42:07 +04:00 committed by GitHub
commit 827c160fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View 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) {