mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
DbgBreakpoint: fix memory leak
This commit is contained in:
parent
37e7e914dc
commit
19fd51a35b
1 changed files with 6 additions and 0 deletions
|
@ -260,6 +260,7 @@ BreakCode DbgBreakpoint::HasHit()
|
|||
if ( ! IsIntegral(yes->Type()->Tag()) &&
|
||||
! IsBool(yes->Type()->Tag()) )
|
||||
{
|
||||
Unref(yes);
|
||||
PrintHitMsg();
|
||||
debug_msg("Breakpoint condition should return an integral type");
|
||||
return bcHitAndDelete;
|
||||
|
@ -267,7 +268,12 @@ BreakCode DbgBreakpoint::HasHit()
|
|||
|
||||
yes->CoerceToInt();
|
||||
if ( yes->IsZero() )
|
||||
{
|
||||
Unref(yes);
|
||||
return bcNoHit;
|
||||
}
|
||||
|
||||
Unref(yes);
|
||||
}
|
||||
|
||||
int repcount = GetRepeatCount();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue