From 6711b55ff59b9e013a1789b8aee743d0a2d8ad5b Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Thu, 28 Nov 2019 10:32:40 +0100 Subject: [PATCH] Set allocator before goto fail. --- rcl/src/rcl/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rcl/src/rcl/init.c b/rcl/src/rcl/init.c index 63b97e6473..c9a175af9e 100644 --- a/rcl/src/rcl/init.c +++ b/rcl/src/rcl/init.c @@ -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) {