Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free PGconn on connection failure #544

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@ragnar-lodbrok
Copy link

ragnar-lodbrok commented Feb 19, 2019

The PG doc says: Note that even if the server connection attempt fails (as indicated by PQstatus), the application should call PQfinish to free the memory used by the PGconn object.
I do not see that PQfinish is (explicitly) called when PQstatus is bad
Note: other rows are bc new-line endings auto convert, you can ignore them
Note 2: I do not have Delphi, it's not tested, based on code review only

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Feb 19, 2019

Ok, that sounds reasonable.

I just overtook your change, without the pull request, because I have no clue how to pull the relevant change only, without the linefeed changes.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Feb 20, 2019

I hope you're aware of the fact that now we have even more of the crashes in 32bit Heidi when calling that PQfinish(). See #37 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.