Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Avoid leaking init options in context. #429

Closed
wants to merge 2 commits into from

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Jun 22, 2020

Spin off form #428.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic hidmic requested a review from ivanpauno June 22, 2020 20:12
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
rmw_ret_t ret = rmw_init_options_copy(options, &context->options);
if (RMW_RET_OK != ret) {
return ret;
goto fail;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the point that was raised in rmw_cyclonedds PR is valid here too.
If rmw_init_options_copy failed, there shouldn't be a need to call rmw_init_options_fini.
If that's needed, it's because rmw_init_options_copy is not handling errors properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hidmic
Copy link
Contributor Author

hidmic commented Jun 25, 2020

This has been superseded by #432.

@hidmic hidmic closed this Jun 25, 2020
@hidmic hidmic deleted the hidmic/avoid-context-options-leaks branch June 25, 2020 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants