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

[OSS 2.x] Sqlite doesn't close temporary backup file handle after use #25950

Closed
philjb opened this issue Jan 31, 2025 · 2 comments
Closed

[OSS 2.x] Sqlite doesn't close temporary backup file handle after use #25950

philjb opened this issue Jan 31, 2025 · 2 comments

Comments

@philjb
Copy link
Contributor

philjb commented Jan 31, 2025

pkg.errors.Capture returns a closure. This is meant to be used in a defer where the returned closure is called at defer-time so it must be Capture(args)() but there is no error if is it only Capture(arg) which does nothing useful at defer time.

func Capture(rErr *error, fn func() error) func() {

Search for this mistake.

@philjb
Copy link
Contributor Author

philjb commented Jan 31, 2025

this fixes this in a tool in 1.x: #25952

philjb added a commit that referenced this issue Feb 4, 2025
* fix: defer calls that return a closure need to be called

* fixes #25950

* chore: avoid a double close

* chore: call defer
@philjb
Copy link
Contributor Author

philjb commented Feb 4, 2025

fixed by #25951

@philjb philjb closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant