Skip to content

Commit

Permalink
Do not deref msg ptr for rmw_{publish,return}_loaned_message*() (#240)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
  • Loading branch information
christophebedard authored Aug 27, 2024
1 parent e01f783 commit b103174
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_rmw_implementation/test/test_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,11 @@ class TestPublisherUseLoan : public TestPublisherUse
EXPECT_EQ(RMW_RET_UNSUPPORTED, ret) << rmw_get_error_string().str;
rmw_reset_error();
EXPECT_EQ(nullptr, msg_pointer);
ret = rmw_return_loaned_message_from_publisher(pub, &msg_pointer);
ret = rmw_return_loaned_message_from_publisher(pub, msg_pointer);
EXPECT_EQ(RMW_RET_UNSUPPORTED, ret) << rmw_get_error_string().str;
rmw_reset_error();
EXPECT_EQ(nullptr, msg_pointer);
ret = rmw_publish_loaned_message(pub, &msg_pointer, null_allocation);
ret = rmw_publish_loaned_message(pub, msg_pointer, null_allocation);
EXPECT_EQ(RMW_RET_UNSUPPORTED, ret) << rmw_get_error_string().str;
rmw_reset_error();
EXPECT_EQ(nullptr, msg_pointer);
Expand Down

0 comments on commit b103174

Please sign in to comment.