mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
GH-2136: Clean up DNS_Mgr before shutting down
This commit is contained in:
parent
65589c9bcb
commit
82576f8de2
3 changed files with 35 additions and 3 deletions
|
@ -61,11 +61,12 @@ Manager::~Manager()
|
|||
delete wakeup;
|
||||
wakeup = nullptr;
|
||||
|
||||
for ( SourceList::iterator i = sources.begin(); i != sources.end(); ++i )
|
||||
{
|
||||
auto src = *i;
|
||||
// Make sure all of the sources are done before we try to delete any of them.
|
||||
for ( auto& src : sources )
|
||||
src->src->Done();
|
||||
|
||||
for ( auto& src : sources )
|
||||
{
|
||||
if ( src->manage_lifetime )
|
||||
delete src->src;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue