mdaems,
Thank you for providing the link to the bug report. Now I see why the change was introduced. The memory leak appears because on TZPostgreSQLConnection.Open the Connect structure in pqlib is created no matter if connection was successful or not. This is ok as pqlib must pass error message back to client some how... But in TZPostgreSQLConnection this made a situation then the connection structure was created but FClosed stayed true.
The solution of 0000136 was to Finish the connection if it does not succeed to connect and it was ok - except it should not be on CheckPostgreSQLError as this procedure is used not only on connect.
Attaching patch.
[bug_fixed] AV when PostgreSQL server connection lost
Moderators: gto, EgonHugeist, olehs
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
-
- Junior Boarder
- Posts: 42
- Joined: 10.01.2009, 00:34
- Location: Brasil
- Contact:
Hellow Mark (and all )
you for providing the link to the bug report.[²]
you for providing the link to the bug report.[²]
Silvio Clécio - http://github.com/risoflora