mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixed ZAM memory leak when coercing values to "any"
This commit is contained in:
parent
a3a0155825
commit
cf1de7e6b7
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,9 @@ eval if ( $1->Size() > 0 )
|
||||||
unary-expr-op To-Any-Coerce
|
unary-expr-op To-Any-Coerce
|
||||||
op-type X
|
op-type X
|
||||||
set-type $1
|
set-type $1
|
||||||
eval AssignTarget($$, ZVal($1.ToVal(Z_TYPE), ZAM::any_base_type))
|
eval auto orig_lhs = $$; /* hold in case $$ = $1 */
|
||||||
|
$$ = ZVal($1.ToVal(Z_TYPE), ZAM::any_base_type);
|
||||||
|
ZVal::DeleteManagedType(orig_lhs);
|
||||||
|
|
||||||
unary-expr-op From-Any-Coerce
|
unary-expr-op From-Any-Coerce
|
||||||
no-const
|
no-const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue