Skip to content

Fix GH-22200: stream api memory leaks.#22204

Open
devnexen wants to merge 2 commits into
php:masterfrom
devnexen:gh22200
Open

Fix GH-22200: stream api memory leaks.#22204
devnexen wants to merge 2 commits into
php:masterfrom
devnexen:gh22200

Conversation

@devnexen
Copy link
Copy Markdown
Member

@devnexen devnexen commented Jun 1, 2026

adding reproducer.

Fix #22200

Report the stream errors before popping the operation off the stack, so
a reentrant error handler that runs another stream operation no longer
reuses the in-flight operation pool slot and orphans its error entry.

While at it, free the docref in php_stream_error_entry_free(), matching the
legacy list destructor.
@devnexen devnexen marked this pull request as ready for review June 1, 2026 21:26
@devnexen devnexen requested a review from bukka as a code owner June 1, 2026 21:26
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.

Memory leaks in the news streams code

1 participant