Skip to content

Commit

Permalink
Zero initialize guard condition on failed init. (#760)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored and ahcorde committed Oct 30, 2020
1 parent 30a9681 commit 8ee5552
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rcl/src/rcl/guard_condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ __rcl_guard_condition_init_from_rmw_impl(
if (!guard_condition->impl->rmw_handle) {
// Deallocate impl and exit.
allocator->deallocate(guard_condition->impl, allocator->state);
guard_condition->impl = NULL;
RCL_SET_ERROR_MSG(rmw_get_error_string().str);
return RCL_RET_ERROR;
}
Expand Down

0 comments on commit 8ee5552

Please sign in to comment.