mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58: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()) &&
|
if ( ! IsIntegral(yes->Type()->Tag()) &&
|
||||||
! IsBool(yes->Type()->Tag()) )
|
! IsBool(yes->Type()->Tag()) )
|
||||||
{
|
{
|
||||||
|
Unref(yes);
|
||||||
PrintHitMsg();
|
PrintHitMsg();
|
||||||
debug_msg("Breakpoint condition should return an integral type");
|
debug_msg("Breakpoint condition should return an integral type");
|
||||||
return bcHitAndDelete;
|
return bcHitAndDelete;
|
||||||
|
@ -267,9 +268,14 @@ BreakCode DbgBreakpoint::HasHit()
|
||||||
|
|
||||||
yes->CoerceToInt();
|
yes->CoerceToInt();
|
||||||
if ( yes->IsZero() )
|
if ( yes->IsZero() )
|
||||||
|
{
|
||||||
|
Unref(yes);
|
||||||
return bcNoHit;
|
return bcNoHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Unref(yes);
|
||||||
|
}
|
||||||
|
|
||||||
int repcount = GetRepeatCount();
|
int repcount = GetRepeatCount();
|
||||||
if ( repcount )
|
if ( repcount )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue