mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Fixing DNS memory leaks.
Some of the changes only clean up at termination to make perftools happt, but there were some "real" leaks as well. This fixes all DNS leaks I could reproducem, including most likely what's reported in #534. Closing #534. I'm also adding a new btest subdir core/leaks with tests requiring perftools support. These don't compare against base lines but abort whenever perftools reports a leak (with stack information to track it down). Right now, these are passing.
This commit is contained in:
parent
8627b87b3e
commit
bd9c937236
10 changed files with 113 additions and 8 deletions
|
@ -49,6 +49,7 @@ public:
|
|||
virtual ~DNS_Mgr();
|
||||
|
||||
bool Init();
|
||||
void Flush();
|
||||
|
||||
// Looks up the address or addresses of the given host, and returns
|
||||
// a set of addr.
|
||||
|
@ -111,6 +112,9 @@ protected:
|
|||
void CheckAsyncAddrRequest(dns_mgr_addr_type addr, bool timeout);
|
||||
void CheckAsyncHostRequest(const char* host, bool timeout);
|
||||
|
||||
// Process outstanding requests.
|
||||
void DoProcess(bool flush);
|
||||
|
||||
// IOSource interface.
|
||||
virtual void GetFds(int* read, int* write, int* except);
|
||||
virtual double NextTimestamp(double* network_time);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue