Skip to content

fix(cli): prevent sqlDB leaks in ConnectToPostgres #10072

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

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Oct 5, 2023

If a ping failed, we would not close the existing sqlDB instance, this refactor of ConnectToPostgres fixes that and a case where context cancellation may lead to a nil pointer dereference.

@mafredri mafredri force-pushed the mafredri/fix-cli-server-connecttopg branch from c1dd875 to f10aeaa Compare October 5, 2023 09:24
@mafredri mafredri marked this pull request as ready for review October 5, 2023 12:24
@mafredri mafredri requested review from coadler and deansheather and removed request for coadler October 5, 2023 12:24
@mafredri mafredri merged commit 48ee80a into main Oct 5, 2023
@mafredri mafredri deleted the mafredri/fix-cli-server-connecttopg branch October 5, 2023 14:57
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants