mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Fix a number of Coverity findings
- 1458048: Use-after-free in the SQLite logger - 1457823: Missing a break statement in script-opt reduction - 1453966: Dead code in CompHash - 1445417: Unintialized variable in StaticHash64 - 1437716: Unintialized variables in FileInfo in scan.l
This commit is contained in:
parent
7dd18ec906
commit
5e00f78920
5 changed files with 8 additions and 6 deletions
|
@ -169,15 +169,16 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields,
|
|||
}
|
||||
|
||||
create += fieldname;
|
||||
sqlite3_free(fieldname);
|
||||
|
||||
string type = GetTableType(field->type, field->subtype);
|
||||
if ( type == "" )
|
||||
{
|
||||
InternalError(Fmt("Could not determine type for field %u:%s", i, fieldname));
|
||||
sqlite3_free(fieldname);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_free(fieldname);
|
||||
create += " " + type;
|
||||
|
||||
/* if ( !field->optional ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue