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

[sqlite] create_collation: memory leak #800

Closed
gwenn opened this issue Nov 8, 2020 · 0 comments · Fixed by #893
Closed

[sqlite] create_collation: memory leak #800

gwenn opened this issue Nov 8, 2020 · 0 comments · Fixed by #893
Labels
bug db:sqlite Related to SQLite E-easy

Comments

@gwenn
Copy link

gwenn commented Nov 8, 2020

https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/sqlite/connection/collation.rs#L59

https://sqlite.org/c3ref/create_collation.html

The xDestroy callback is not called if the sqlite3_create_collation_v2() function fails. Applications that invoke sqlite3_create_collation_v2() with a non-NULL xDestroy argument should check the return code and dispose of the application data pointer themselves rather than expecting SQLite to deal with it for them.

See rusqlite fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug db:sqlite Related to SQLite E-easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants