mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Merge remote-tracking branch 'origin/topic/johanna/leaks'
BIT-1633 #merged * origin/topic/johanna/leaks: Fix one more memory leak. Fix two memory leaks reported on mailing list.
This commit is contained in:
commit
1b5af579be
5 changed files with 15 additions and 1 deletions
|
@ -14,6 +14,12 @@
|
|||
#include "Reporter.h"
|
||||
#include "Net.h"
|
||||
|
||||
static void persistence_serializer_delete_func(void* val)
|
||||
{
|
||||
time_t* t = reinterpret_cast<time_t*>(val);
|
||||
free(t);
|
||||
}
|
||||
|
||||
class IncrementalWriteTimer : public Timer {
|
||||
public:
|
||||
IncrementalWriteTimer(double t, PersistenceSerializer::SerialStatus* s)
|
||||
|
@ -36,6 +42,7 @@ void IncrementalWriteTimer::Dispatch(double t, int is_expire)
|
|||
PersistenceSerializer::PersistenceSerializer()
|
||||
{
|
||||
dir = 0;
|
||||
files.SetDeleteFunc(persistence_serializer_delete_func);
|
||||
}
|
||||
|
||||
PersistenceSerializer::~PersistenceSerializer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue