mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
memory management fixes for loggers
This commit is contained in:
parent
41aee03c17
commit
fbe33d4ee9
3 changed files with 15 additions and 16 deletions
|
@ -251,7 +251,7 @@ void dispatch_packet(Packet* pkt, iosource::PktSrc* pkt_src)
|
|||
// charged against this sample.
|
||||
event_mgr.Drain();
|
||||
|
||||
zeek::detail::sample_logger = new zeek::detail::SampleLogger();
|
||||
zeek::detail::sample_logger = std::make_shared<zeek::detail::SampleLogger>();
|
||||
sp = new zeek::detail::SegmentProfiler(zeek::detail::sample_logger, "load-samp");
|
||||
}
|
||||
}
|
||||
|
@ -262,7 +262,6 @@ void dispatch_packet(Packet* pkt, iosource::PktSrc* pkt_src)
|
|||
if ( sp )
|
||||
{
|
||||
delete sp;
|
||||
delete zeek::detail::sample_logger;
|
||||
zeek::detail::sample_logger = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue