mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
A destructor must free the memory allocated by the constructor
This commit is contained in:
parent
7dfb5657a2
commit
1df650eb0d
4 changed files with 13 additions and 0 deletions
|
@ -42,6 +42,12 @@ Gnutella_Analyzer::Gnutella_Analyzer(Connection* conn)
|
|||
resp_msg_state = new GnutellaMsgState();
|
||||
}
|
||||
|
||||
Gnutella_Analyzer::~Gnutella_Analyzer()
|
||||
{
|
||||
delete orig_msg_state;
|
||||
delete resp_msg_state;
|
||||
}
|
||||
|
||||
void Gnutella_Analyzer::Done()
|
||||
{
|
||||
TCP_ApplicationAnalyzer::Done();
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
class Gnutella_Analyzer : public TCP_ApplicationAnalyzer {
|
||||
public:
|
||||
Gnutella_Analyzer(Connection* conn);
|
||||
~Gnutella_Analyzer();
|
||||
|
||||
virtual void Done ();
|
||||
virtual void DeliverStream(int len, const u_char* data, bool orig);
|
||||
|
|
|
@ -225,5 +225,7 @@ NCP_Analyzer::NCP_Analyzer(Connection* conn)
|
|||
NCP_Analyzer::~NCP_Analyzer()
|
||||
{
|
||||
delete session;
|
||||
delete o_ncp;
|
||||
delete r_ncp;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,6 +135,10 @@ NetSessions::~NetSessions()
|
|||
delete SYN_OS_Fingerprinter;
|
||||
delete pkt_profiler;
|
||||
Unref(arp_analyzer);
|
||||
if (discarder)
|
||||
delete discarder;
|
||||
if (stp_manager)
|
||||
delete stp_manager;
|
||||
}
|
||||
|
||||
void NetSessions::Done()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue