Fixed some memory leaks with http/3#9336
Merged
bryancall merged 1 commit intoapache:10-Devfrom Feb 1, 2023
Merged
Conversation
Contributor
Author
|
For reference this is where And |
maskit
reviewed
Jan 31, 2023
| HQSession::remove_transaction(HQTransaction *trans) | ||
| { | ||
| this->_transaction_list.remove(trans); | ||
| delete trans; |
Member
There was a problem hiding this comment.
I feel like I want to delete transactions on the caller side, but I'll propose the change later.
Member
There was a problem hiding this comment.
This is fine, but I wonder why it leaks. Because all transactions in _transaction_list are deleted in the destructor of HQSession. See #9346
Contributor
Author
There was a problem hiding this comment.
If HQSession::remove_transaction() is called it will remove the transaction from the _transaction_list and it will never be deleted.
Member
There was a problem hiding this comment.
Ah, you're right. Go ahead and merge this.
maskit
approved these changes
Jan 31, 2023
bryancall
added a commit
to bryancall/trafficserver
that referenced
this pull request
Feb 3, 2023
(cherry picked from commit a776a9f)
bryancall
added a commit
that referenced
this pull request
Feb 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These numbers are with using freelists:
Before:
SUMMARY: AddressSanitizer: 9997094750 byte(s) leaked in 4587157 allocation(s).After:
SUMMARY: AddressSanitizer: 137185838 byte(s) leaked in 77301 allocation(s).