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

Minor fix: Fix protoleak. #16101

Merged
merged 1 commit into from
Apr 26, 2021
Merged

Conversation

KBaichoo
Copy link
Contributor

@KBaichoo KBaichoo commented Apr 21, 2021

Signed-off-by: Kevin Baichoo [email protected]

Commit Message: Fixed proto leaks.
Additional Description: Let protos manage memory themselves vs explicitly handling it with set_foo and release_foo
Risk Level: Low
Testing: NA
Docs Changes: NA
Release Notes: NA
Platform Specific Features: NA

Signed-off-by: Kevin Baichoo <[email protected]>
@KBaichoo
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16101 (comment) was created by @KBaichoo.

see: more, trace.

@KBaichoo
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16101 (comment) was created by @KBaichoo.

see: more, trace.

@akonradi
Copy link
Contributor

I like the change but I think the description is wrong. The proto was only ever allocated on the stack, so using the set_allocated and release_ methods seems like the right way to prevent calls to delete that would have been erroneous. This is the correct fix though: letting protos manage memory themselves and accessing them through the normal API.

@KBaichoo
Copy link
Contributor Author

Yep that's correct. We're dealing with raw pointers and ownership isn't explicit as using a smart ptr.

@KBaichoo
Copy link
Contributor Author

Can I get a review @envoyproxy/maintainers ?

This is a minor fix to a test. Thanks!

@jmarantz jmarantz merged commit 0143bc2 into envoyproxy:main Apr 26, 2021
gokulnair pushed a commit to gokulnair/envoy that referenced this pull request May 6, 2021
Signed-off-by: Kevin Baichoo <[email protected]>

Commit Message: Fixed proto leaks.
Additional Description: Let protos manage memory themselves vs explicitly handling it with set_foo and release_foo
Risk Level: Low
Testing: NA
Docs Changes: NA
Release Notes: NA
Platform Specific Features: NA

Signed-off-by: Gokul Nair <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants