TSQLConnection destructor may raise exception leading to memory leak
Original Reporter info from Mantis: zamronypj @zamronypj
-
Reporter name: Zamrony P. Juhara
Original Reporter info from Mantis: zamronypj @zamronypj
- Reporter name: Zamrony P. Juhara
Description:
From
https://github.com/graemeg/freepascal/blob/master/packages/fcl-db/src/sqldb/sqldb.pp
destructor TSQLConnection.Destroy;
begin
Connected:=False; // needed because we want to de-allocate statements
FreeAndNil(FStatements);
inherited Destroy;
end;
If it is connected then later database server shuts down, Connected:=false may raise exception which cause destruction incomplete and leaking memory
Mantis conversion info:
- Mantis ID: 37993
- Fixed in version: 3.3.1
- Fixed in revision: 47216 (#6d581608)
- Target version: 3.2.2