Ensure rcl_publisher_init() fails safely. (#667)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This commit is contained in:
parent
06bd93bc87
commit
e47042cba4
1 changed files with 1 additions and 0 deletions
|
@ -198,6 +198,7 @@ rcl_publisher_init(
|
|||
fail:
|
||||
if (publisher->impl) {
|
||||
allocator->deallocate(publisher->impl, allocator->state);
|
||||
publisher->impl = NULL;
|
||||
}
|
||||
|
||||
ret = fail_ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue