Skip to content

Commit

Permalink
fix leak in test_context
Browse files Browse the repository at this point in the history
Signed-off-by: Abby Xu <abbyxu@amazon.com>
  • Loading branch information
xabxx committed May 16, 2019
1 parent 4e0b33f commit 7278923
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rcl/test/rcl/test_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}

0 comments on commit 7278923

Please sign in to comment.