mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Fix another function val reference counting bug.
Now that functions get unref'd in the val dtor in order to free mem of unserialized functions, it's important to ref a function when creating a val from a pre-existing function so it's not prematurely free'd.
This commit is contained in:
parent
bcf79fe11a
commit
33a7e96268
1 changed files with 1 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
||||||
Val::Val(Func* f)
|
Val::Val(Func* f)
|
||||||
{
|
{
|
||||||
val.func_val = f;
|
val.func_val = f;
|
||||||
|
::Ref(val.func_val);
|
||||||
type = f->FType()->Ref();
|
type = f->FType()->Ref();
|
||||||
attribs = 0;
|
attribs = 0;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue