From bc2d1cf51c4222b7cb18c93e990436df877a56b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Fri, 1 Mar 2024 12:06:06 +0100 Subject: [PATCH] * Remove additional memleak --- packages/rtl-objpas/src/inc/rtti.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/rtl-objpas/src/inc/rtti.pp b/packages/rtl-objpas/src/inc/rtti.pp index 62d6c2abe3..9af021157f 100644 --- a/packages/rtl-objpas/src/inc/rtti.pp +++ b/packages/rtl-objpas/src/inc/rtti.pp @@ -5954,7 +5954,11 @@ begin SetLength(FFields,Len); FFieldsResolved:=True; if Len=0 then + begin + if Assigned(Tbl) then + FreeMem(Tbl); exit; + end; Ctx:=TRttiContext.Create; try Ctx.UsePublishedOnly:=False;