Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http2: fix memory leak when headers are not emitted
When headers are not emitted to JS, e.g. because of an error before that could happen, we currently still have the vector of previously received headers lying around, each one holding a reference count of 1. To fix the resulting memory leak, release them in the `Http2Stream` destructor. Also, clear the vector of headers once they have been emitted – there’s not need to keep it around, wasting memory. PR-URL: #21373 Reviewed-By: Tiancheng "Timothy" Gu <email@example.com>
- Loading branch information
Showing with 10 additions and 11 deletions.