mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
scan.l: fix crash bug in do_atif()
This is really a memory leak because the Unref() call is missing. But since this usually returns a "stock" object (`ValManager::b_true` or `ValManager::b_false`), nothing really leaks. But eventually, the reference counter will overflow to `INT_MAX`, leading to a crash in bad_ref().
This commit is contained in:
parent
0a0884edb4
commit
bb1390caaa
1 changed files with 2 additions and 0 deletions
|
@ -762,6 +762,8 @@ void do_atif(Expr* expr)
|
|||
if_stack.push_back(current_depth);
|
||||
BEGIN(IGNORE);
|
||||
}
|
||||
|
||||
Unref(val);
|
||||
}
|
||||
|
||||
void do_atifdef(const char* id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue