mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Fixing memory leak in changed table expiration code.
This commit is contained in:
parent
4035af4b12
commit
b698cfc2ce
3 changed files with 19 additions and 2 deletions
|
@ -2274,8 +2274,10 @@ double TableVal::GetExpireTime()
|
|||
return -1;
|
||||
|
||||
Val* timeout = expire_time->Eval(0);
|
||||
double interval = (timeout ? timeout->AsInterval() : -1);
|
||||
Unref(timeout);
|
||||
|
||||
if ( timeout && (timeout->AsInterval() >= 0) )
|
||||
if ( interval >= 0 )
|
||||
return timeout->AsInterval();
|
||||
|
||||
expire_time = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue