Skip to content

ext/mysqlnd: Fix memory leak when closing a statement on a killed connection - #21765

Closed
kamil-tekiela wants to merge 1 commit into
php:PHP-8.4from
kamil-tekiela:Fix-close_on_server
Closed

kamil-tekiela wants to merge 1 commit into
php:PHP-8.4from
kamil-tekiela:Fix-close_on_server

Conversation

@kamil-tekiela

Copy link
Copy Markdown
Member

No description provided.

Comment thread ext/mysqlnd/mysqlnd_ps.c Outdated

@ndossche ndossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm no longer involved, so can't meaningfully review this without spending time on it.
From a quick look it seems logical but who knows for sure without spending more time on it.

Comment thread ext/mysqlnd/mysqlnd_ps.c
@bukka

bukka commented Apr 17, 2026

Copy link
Copy Markdown
Member

I think this should be testable using fake server.

@kamil-tekiela
kamil-tekiela marked this pull request as draft September 24, 2026 15:58
@kamil-tekiela
kamil-tekiela changed the base branch from master to PHP-8.4 September 24, 2026 16:56
@kamil-tekiela
kamil-tekiela marked this pull request as ready for review September 24, 2026 16:56
@kamil-tekiela kamil-tekiela reopened this Sep 24, 2026
@kamil-tekiela

Copy link
Copy Markdown
Member Author

@bukka I have added a test for this which showed that my fix wasn't complete. I rewrote the whole PR and changed the target to PHP 8.4.

@kamil-tekiela kamil-tekiela changed the title ext/mysqlnd: Fix close_on_server ext/mysqlnd: Fix memory leak when closing a statement on a killed connection Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants