Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[foxy] Fix memory leak that wait_set might be not destoryed in some case. (#423) #426

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rmw_fastrtps_shared_cpp/src/listener_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ node_listener(rmw_context_t * context)
{
TERMINATE_THREAD("rmw_wait failed");
}
if (RMW_RET_OK != rmw_fastrtps_shared_cpp::__rmw_destroy_wait_set(
context->implementation_identifier, wait_set))
{
TERMINATE_THREAD("failed to destroy wait set");
}
if (subscriptions_buffer[0]) {
rmw_dds_common::msg::ParticipantEntitiesInfo msg;
bool taken;
Expand All @@ -168,10 +173,5 @@ node_listener(rmw_context_t * context)
common_context->graph_cache.update_participant_entities(msg);
}
}
if (RMW_RET_OK != rmw_fastrtps_shared_cpp::__rmw_destroy_wait_set(
context->implementation_identifier, wait_set))
{
TERMINATE_THREAD("failed to destroy wait set");
}
}
}