diff --git a/components/fpdebug/fpdbgdwarf.pas b/components/fpdebug/fpdbgdwarf.pas index a12d5c81b0..1eeddc6be6 100644 --- a/components/fpdebug/fpdbgdwarf.pas +++ b/components/fpdebug/fpdbgdwarf.pas @@ -2432,6 +2432,8 @@ begin finally ReleaseRefAndNil(SubRoutine); + if Result = nil then + ReleaseRefAndNil(InfoEntry); ReleaseRefAndNil(InfoEntry2); end; end;