Call PQfinish() when PostgreSQL connection failed to initialize. Closes #544.

This commit is contained in:
Ansgar Becker
2019-02-19 19:26:42 +01:00
parent 638b5e562a
commit c6971c66bb

View File

@ -2083,6 +2083,7 @@ begin
Error := LastErrorMsg;
Log(lcError, Error);
FConnectionStarted := 0;
PQfinish(FHandle); // free the memory
FHandle := nil;
raise EDatabaseError.Create(Error);
end;