Zero initialize guard condition on failed init. (#760)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
parent
8d7bb9fe65
commit
6d32b6767e
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue