View Issue Details

IDProjectCategoryView StatusLast Update
0035759FPCDatabasepublic2020-07-22 08:12
ReporterBrunoK Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386/x64OSWindows 
Product Version3.0.4 
Fixed in Version3.3.1 
Summary0035759: Memory not released when parsing new filter string
DescriptionSee https://bugs.freepascal.org/view.php?id=35756 marked as resolved.
Additional InformationAdded proposed patch dbf_prscore.pas

Type 2 memory leak.
See https://bugs.freepascal.org/view.php?id=35684#c116685 for explanation what I consider type 2 leaks.
TagsNo tags attached.
Fixed in Revision42280
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

BrunoK

2019-06-24 10:31

reporter  

dbf_prscore.pas.patch (529 bytes)   
Index: packages/fcl-db/src/dbase/dbf_prscore.pas
===================================================================
--- packages/fcl-db/src/dbase/dbf_prscore.pas	(revision 41854)
+++ packages/fcl-db/src/dbase/dbf_prscore.pas	(working copy)
@@ -331,6 +331,7 @@
     ExprTree := nil;
     ExpColl := TExprCollection.Create;
     try
+      FConstantsList.FreeAll; // ~bk release previously allocated constants
       //    FCurrentExpression := anExpression;
       ParseString(AnExpression, ExpColl);
       Check(ExpColl);
dbf_prscore.pas.patch (529 bytes)   

Michael Van Canneyt

2019-06-24 10:43

administrator   ~0116886

Nice catch !

I applied the patch, thank you very much !

Issue History

Date Modified Username Field Change
2019-06-24 10:31 BrunoK New Issue
2019-06-24 10:31 BrunoK File Added: dbf_prscore.pas.patch
2019-06-24 10:43 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-06-24 10:43 Michael Van Canneyt Status new => resolved
2019-06-24 10:43 Michael Van Canneyt Resolution open => fixed
2019-06-24 10:43 Michael Van Canneyt Fixed in Version => 3.3.1
2019-06-24 10:43 Michael Van Canneyt Fixed in Revision => 42280
2019-06-24 10:43 Michael Van Canneyt FPCTarget => 3.2.0
2019-06-24 10:43 Michael Van Canneyt Note Added: 0116886
2020-07-22 08:12 BrunoK Status resolved => closed