Fix memory leak in Zeek when-statement bodies with runtime errors

This commit is contained in:
Jon Siwek 2020-03-23 21:50:00 -07:00
parent b045ce4bb3
commit 94656c2308
2 changed files with 19 additions and 6 deletions

View file

@ -59,8 +59,10 @@ public:
// to the given trigger. Note, automatically calls Hold().
void Attach(Trigger* trigger);
// Cache for return values of delayed function calls.
void Cache(const CallExpr* expr, Val* val);
// Cache for return values of delayed function calls. Returns whether
// the trigger is queued for later evaluation -- it may not be queued
// if the Val is null or it's disabled.
bool Cache(const CallExpr* expr, Val* val);
Val* Lookup(const CallExpr*);
// Disable this trigger completely. Needed because Unref'ing the trigger