libtt: Fixes for Coverity fixes that I thought I'd already fixed.

This commit is contained in:
Peter Howkins
2018-04-24 00:05:56 +01:00
parent d52e9390ec
commit 9088d6b54e
8 changed files with 11 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ declare_ptr_to(_Tt_api_stg_stack)
class _Tt_api_stg_stack_elm : public _Tt_object {
public:
_Tt_api_stg_stack_elm() { addr = NULL; };
_Tt_api_stg_stack_elm() { addr = NULL; entry_type = STACK_MARK; };
~_Tt_api_stg_stack_elm();
enum {STACK_MARK, STACK_STORAGE} entry_type;
caddr_t addr;

View File

@@ -52,6 +52,9 @@ _Tt_client_isam_file::_Tt_client_isam_file (const _Tt_string &file,
else {
getStatusInfo();
}
maxRecordLength = 0;
minRecordLength = 0;
}
_Tt_client_isam_file
@@ -82,6 +85,8 @@ _Tt_client_isam_file
}
if (fileDescriptor != -1) {
currentRecordLength = 0;
currentRecordNumber = 0;
getISAMFileInfo();
}
else {

View File

@@ -280,6 +280,7 @@ write_auth_file(char *filename)
_tt_syslog(0, LOG_ERR,
"%s: unable to open tmp file \"%s\"\n",
funcname, tmpnam);
free(tmpnam);
return TT_AUTHFILE_ACCESS;
}

View File

@@ -527,6 +527,7 @@ entry(const char *argskey, _Tt_entry_pt func, ...)
if (arg_index < 0 || msg_args.is_null() ||
msg_args->count() <= arg_index) {
va_end(ap);
return TT_ERR_NUM;
}
} else {

View File

@@ -78,6 +78,7 @@ _tt_log_error(int errno, int line, char *file, char *msg)
}
/* Close on exec */
if(fcntl(fileno(fl), F_SETFD, 1) == -1) {
fclose(fl);
return;
}