2
0
Эх сурвалжийг харах

* Fix memleak in check

git-svn-id: trunk@38571 -
michael 7 жил өмнө
parent
commit
65b39fa567

+ 8 - 4
packages/fcl-report/src/fpreportdata.pp

@@ -698,10 +698,14 @@ begin
   else
     begin
     H:=TFPCustomReportDataManager.GetTypeHandler(DataType);
-    if H=Nil then
-      Result:=Format(SErrInvalidDataType,[DataType])
-    else
-      Result:=H.CheckConfig(Config);
+    try
+      if H=Nil then
+        Result:=Format(SErrInvalidDataType,[DataType])
+      else
+        Result:=H.CheckConfig(Config);
+    Finally
+      H.Free;
+    end;
     end;
 end;