Skip to content

Minor fix: Fix protoleak. - #16101

Merged
jmarantz merged 1 commit into
envoyproxy:mainfrom
KBaichoo:plug-proto-leak
Apr 26, 2021
Merged

jmarantz merged 1 commit into
envoyproxy:mainfrom
KBaichoo:plug-proto-leak

Conversation

@KBaichoo

@KBaichoo KBaichoo commented Apr 21, 2021 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

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

🐱

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

see: more, trace.

@akonradi

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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