DbgBreakpoint: fix memory leak

This commit is contained in:
Max Kellermann 2020-02-19 10:22:51 +01:00
parent 37e7e914dc
commit 19fd51a35b

View file

@ -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();