From 3343d3c981581dc7290fe748a153a10cbea91d90 Mon Sep 17 00:00:00 2001 From: Abby Xu Date: Thu, 16 May 2019 15:08:46 -0700 Subject: [PATCH] fix leak in test_context --- rcl/test/rcl/test_context.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rcl/test/rcl/test_context.cpp b/rcl/test/rcl/test_context.cpp index 6cdc37128e..9eb61dc334 100644 --- a/rcl/test/rcl/test_context.cpp +++ b/rcl/test/rcl/test_context.cpp @@ -111,4 +111,8 @@ TEST_F(CLASSNAME(TestContextFixture, RMW_IMPLEMENTATION), nominal) { }); EXPECT_NE(rmw_context_ptr, nullptr) << rcl_get_error_string().str; rcl_reset_error(); + + OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT({ + EXPECT_EQ(RCL_RET_OK, rcl_init_options_fini(&init_options)) << rcl_get_error_string().str; + }); }