diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 22faa300..45668b52 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -2083,6 +2083,7 @@ begin Error := LastErrorMsg; Log(lcError, Error); FConnectionStarted := 0; + PQfinish(FHandle); // free the memory FHandle := nil; raise EDatabaseError.Create(Error); end;