Skip to content

Commit

Permalink
Set allocator before goto fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
BorjaOuterelo committed Nov 28, 2019
1 parent 1b4b3dd commit 6711b55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rcl/src/rcl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ rcl_init(
// Zero initialize rmw context first so its validity can by checked in cleanup.
context->impl->rmw_context = rmw_get_zero_initialized_context();

// Store the allocator.
context->impl->allocator = allocator;

// Copy the options into the context for future reference.
rcl_ret_t ret = rcl_init_options_copy(options, &(context->impl->init_options));
if (RCL_RET_OK != ret) {
Expand Down

0 comments on commit 6711b55

Please sign in to comment.