mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Merge branch 'master-merge-helper'
* master-merge-helper: possible use after free forbidden Suppression of unused code Fix of some memory leaks removing dead code A destructor must free the memory allocated by the constructor Good overridance with the good qualifier Better use of operators priorities protection from bad frees on unallocated strings
This commit is contained in:
commit
ada5f38d04
22 changed files with 67 additions and 30 deletions
10
src/Net.cc
10
src/Net.cc
|
@ -143,7 +143,7 @@ RETSIGTYPE watchdog(int /* signo */)
|
|||
return RETSIGVAL;
|
||||
}
|
||||
|
||||
void net_init(name_list& interfaces, name_list& readfiles,
|
||||
void net_init(name_list& interfaces, name_list& readfiles,
|
||||
name_list& netflows, name_list& flowfiles,
|
||||
const char* writefile, const char* filter,
|
||||
const char* secondary_filter, int do_watchdog)
|
||||
|
@ -248,12 +248,14 @@ void net_init(name_list& interfaces, name_list& readfiles,
|
|||
FlowSocketSrc* fs = new FlowSocketSrc(netflows[i]);
|
||||
|
||||
if ( ! fs->IsOpen() )
|
||||
{
|
||||
reporter->Error("%s: problem with netflow socket %s - %s\n",
|
||||
prog, netflows[i], fs->ErrorMsg());
|
||||
else
|
||||
{
|
||||
io_sources.Register(fs);
|
||||
delete fs;
|
||||
}
|
||||
|
||||
else
|
||||
io_sources.Register(fs);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue