mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Fix memory leak when no protocol_violation event handler exists
This commit is contained in:
parent
7f0fb49612
commit
88278214a9
3 changed files with 8 additions and 4 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.6-335 | 2019-05-24 08:58:59 -0700
|
||||||
|
|
||||||
|
* Fix memory leak when no protocol_violation event handler exists (Jon Siwek, Corelight)
|
||||||
|
|
||||||
2.6-334 | 2019-05-23 20:40:03 -0700
|
2.6-334 | 2019-05-23 20:40:03 -0700
|
||||||
|
|
||||||
* Add an internal getenv wrapper function: zeekenv (Jon Siwek, Corelight)
|
* Add an internal getenv wrapper function: zeekenv (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-334
|
2.6-335
|
||||||
|
|
|
@ -679,6 +679,9 @@ void Analyzer::ProtocolConfirmation(Tag arg_tag)
|
||||||
|
|
||||||
void Analyzer::ProtocolViolation(const char* reason, const char* data, int len)
|
void Analyzer::ProtocolViolation(const char* reason, const char* data, int len)
|
||||||
{
|
{
|
||||||
|
if ( ! protocol_violation )
|
||||||
|
return;
|
||||||
|
|
||||||
StringVal* r;
|
StringVal* r;
|
||||||
|
|
||||||
if ( data && len )
|
if ( data && len )
|
||||||
|
@ -692,9 +695,6 @@ void Analyzer::ProtocolViolation(const char* reason, const char* data, int len)
|
||||||
else
|
else
|
||||||
r = new StringVal(reason);
|
r = new StringVal(reason);
|
||||||
|
|
||||||
if ( ! protocol_violation )
|
|
||||||
return;
|
|
||||||
|
|
||||||
EnumVal* tval = tag.AsEnumVal();
|
EnumVal* tval = tag.AsEnumVal();
|
||||||
Ref(tval);
|
Ref(tval);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue