Skip to content
Permalink
Browse files

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

  • Loading branch information...
ansgarbecker committed Feb 19, 2019
1 parent 638b5e5 commit c6971c66bb3c893a37b45e87b5be1e0dec84103e
Showing with 1 addition and 0 deletions.
  1. +1 −0 source/dbconnection.pas
@@ -2083,6 +2083,7 @@ procedure TPgConnection.SetActive(Value: Boolean);
Error := LastErrorMsg;
Log(lcError, Error);
FConnectionStarted := 0;
PQfinish(FHandle); // free the memory
FHandle := nil;
raise EDatabaseError.Create(Error);
end;

0 comments on commit c6971c6

Please sign in to comment.
You can’t perform that action at this time.