mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Fixing ref'counting problem.
This commit is contained in:
parent
2af9d9bc20
commit
f9cd97d78d
2 changed files with 2 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit c39622855e3c3a5cc94c7376f86184ed1db1939a
|
Subproject commit ad8dfaba0c0c784060aa6f0c5e1fcf62244b1a51
|
|
@ -5022,13 +5022,11 @@ Val* ListExpr::InitVal(const BroType* t, Val* aggr) const
|
||||||
Expr* e = exprs[i];
|
Expr* e = exprs[i];
|
||||||
check_and_promote_expr(e, vec->Type()->AsVectorType()->YieldType());
|
check_and_promote_expr(e, vec->Type()->AsVectorType()->YieldType());
|
||||||
Val* v = e->Eval(0);
|
Val* v = e->Eval(0);
|
||||||
if ( ! vec->Assign(i, v->RefCnt() == 1 ? v->Ref() : v, e) )
|
if ( ! vec->Assign(i, v, e) )
|
||||||
{
|
{
|
||||||
e->Error(fmt("type mismatch at index %d", i));
|
e->Error(fmt("type mismatch at index %d", i));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Unref(v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return aggr;
|
return aggr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue