Fix memory leak w/ when statements - BIT-1058

Specifically if the condition of a when statement uses an index
expression (e.g. table lookup).
This commit is contained in:
Jon Siwek 2013-08-21 14:28:52 -05:00
parent bc819750b9
commit 8432f05bdb

View file

@ -44,7 +44,10 @@ TraversalCode TriggerTraversalCallback::PreExpr(const Expr* expr)
BroObj::SuppressErrors no_errors;
Val* v = e->Eval(trigger->frame);
if ( v )
{
trigger->Register(v);
Unref(v);
}
break;
}