mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Fixing a big pile of Coverity issues
1469562/1469558: Uninitialized fields in Func constructor 1469571/1469566: Null pointer dereference in Trigger::Init() 1469568: Uninitialized fields in CounterVector constructor 1469570: Uncaught exception in plugin manager 1469569: Resource leak in script_opt::Stmt 1469561/1469561: Uninitialized fields in ZBody constructor 1469559: Uninitialized fields in logging::Manager 1469563: Resource leak in ZAMCompiler::CompileDel 1469549/1469553/1469556: Context not fully initialized in HashVals 1469548: Remove dead code from IPAddr 1469551/1469554: Handle iosource_mgr registration failure in broker::Manager 1469552/1469572: Resource leaks in input::Manager
This commit is contained in:
parent
41abf8f422
commit
a117c81d85
13 changed files with 93 additions and 70 deletions
|
@ -1473,8 +1473,9 @@ void Manager::SendEndOfData(const Stream* i)
|
|||
#ifdef DEBUG
|
||||
DBG_LOG(DBG_INPUT, "SendEndOfData for stream %s", i->name.c_str());
|
||||
#endif
|
||||
SendEvent(end_of_data, 2, new StringVal(i->name.c_str()),
|
||||
new StringVal(i->reader->Info().source));
|
||||
auto name = make_intrusive<StringVal>(i->name.c_str());
|
||||
auto source = make_intrusive<StringVal>(i->reader->Info().source);
|
||||
SendEvent(end_of_data, 2, name->Ref(), source->Ref());
|
||||
|
||||
if ( i->stream_type == ANALYSIS_STREAM )
|
||||
file_mgr->EndOfFile(static_cast<const AnalysisStream*>(i)->file_id);
|
||||
|
@ -2560,8 +2561,8 @@ void Manager::ErrorHandler(const Stream* i, ErrorType et, bool reporter_send, co
|
|||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
auto* message = new StringVal(buf);
|
||||
SendEvent(i->error_event, 3, i->description->Ref(), message, ev.release());
|
||||
auto message = make_intrusive<StringVal>(buf);
|
||||
SendEvent(i->error_event, 3, i->description->Ref(), message->Ref(), ev.release());
|
||||
}
|
||||
|
||||
if ( reporter_send )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue