Skip to content

Commit

Permalink
Finalize init options in context.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Jun 22, 2020
1 parent b9b418d commit 2161bca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ rmw_context_fini(rmw_context_t * context)
RCUTILS_SET_ERROR_MSG("context has not been shutdown");
return RMW_RET_INVALID_ARGUMENT;
}
rmw_ret_t ret = rmw_init_options_fini(&context->options);
if (RMW_RET_OK != ret) {
return ret;
}
delete context->impl;
*context = rmw_get_zero_initialized_context();
return RMW_RET_OK;
Expand Down
4 changes: 4 additions & 0 deletions rmw_fastrtps_dynamic_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ rmw_context_fini(rmw_context_t * context)
RCUTILS_SET_ERROR_MSG("context has not been shutdown");
return RMW_RET_INVALID_ARGUMENT;
}
rmw_ret_t ret = rmw_init_options_fini(&context->options);
if (RMW_RET_OK != ret) {
return ret;
}
delete context->impl;
*context = rmw_get_zero_initialized_context();
return RMW_RET_OK;
Expand Down

0 comments on commit 2161bca

Please sign in to comment.