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

Use RCPPUTILS_SCOPE_EXIT to cleanup unparsed_indices_c. #1075

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

clalancette
Copy link
Contributor

The unique_ptr way to do this works, but clang static analysis complains that data could be leaked if the construction of the unique_ptr fails. Since this code is really old, switch to using RCPPUTILS_SCOPE_EXIT, which is our more modern way to deal with this problem.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

The unique_ptr way to do this works, but clang static analysis
complains that data could be leaked if the construction of
the unique_ptr fails.  Since this code is really old, switch
to using RCPPUTILS_SCOPE_EXIT, which is our more modern way
to deal with this problem.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

CI for this is in ros2/rcl#1031 (comment)

@clalancette clalancette merged commit e9323a7 into rolling Feb 1, 2023
@clalancette clalancette deleted the clalancette/scope-cleanup branch February 1, 2023 19:05
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.

2 participants