mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
fix opaqueval-related memleak.
This commit is contained in:
parent
3e74cdc6e0
commit
f6e99fce11
3 changed files with 4 additions and 1 deletions
|
@ -243,6 +243,7 @@ OpaqueType* md5_type;
|
|||
OpaqueType* sha1_type;
|
||||
OpaqueType* sha256_type;
|
||||
OpaqueType* entropy_type;
|
||||
OpaqueType* cardinality_type;
|
||||
|
||||
#include "const.bif.netvar_def"
|
||||
#include "types.bif.netvar_def"
|
||||
|
@ -308,6 +309,7 @@ void init_general_global_var()
|
|||
sha1_type = new OpaqueType("sha1");
|
||||
sha256_type = new OpaqueType("sha256");
|
||||
entropy_type = new OpaqueType("entropy");
|
||||
cardinality_type = new OpaqueType("cardinality");
|
||||
}
|
||||
|
||||
void init_net_var()
|
||||
|
|
|
@ -248,6 +248,7 @@ extern OpaqueType* md5_type;
|
|||
extern OpaqueType* sha1_type;
|
||||
extern OpaqueType* sha256_type;
|
||||
extern OpaqueType* entropy_type;
|
||||
extern OpaqueType* cardinality_type;
|
||||
|
||||
// Initializes globals that don't pertain to network/event analysis.
|
||||
extern void init_general_global_var();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "HyperLogLog.h"
|
||||
|
||||
|
||||
CardinalityVal::CardinalityVal() : OpaqueVal(new OpaqueType("cardinality"))
|
||||
CardinalityVal::CardinalityVal() : OpaqueVal(cardinality_type)
|
||||
{
|
||||
valid = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue