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

Fix MySQL handle leak #4722

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

ranisalt
Copy link
Member

@ranisalt ranisalt commented Jun 2, 2024

Pull Request Prelude

Changes Proposed

The first leak in #4288 is related to handle leaking, I couldn't really reproduce how mysql_init is called without mysql_close not being called on the line before, but using a unique_ptr with a custom deleter fixes the leak.

Using unique_ptr for MYSQL_RES also fixes eventual leaks that happen on queries.

src/database.cpp Fixed Show fixed Hide fixed
src/database.cpp Dismissed Show dismissed Hide dismissed
src/database.cpp Fixed Show fixed Hide fixed
src/database.cpp Dismissed Show dismissed Hide dismissed
src/database.cpp Fixed Show fixed Hide fixed
@EvilHero90 EvilHero90 added this to the 1.6 milestone Jun 3, 2024
@EvilHero90 EvilHero90 added bugfix priority: critical Issues with this label should be resolved as quickly as possible labels Jun 3, 2024
Copy link
Contributor

@EvilHero90 EvilHero90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@EvilHero90 EvilHero90 merged commit e80e408 into otland:master Jun 5, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix priority: critical Issues with this label should be resolved as quickly as possible
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants