Skip to content

Commit

Permalink
Ensure rcl_publisher_init() fails safely. (ros2#667)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic authored Jun 1, 2020
1 parent 06bd93b commit e47042c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rcl/src/rcl/publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ rcl_publisher_init(
fail:
if (publisher->impl) {
allocator->deallocate(publisher->impl, allocator->state);
publisher->impl = NULL;
}

ret = fail_ret;
Expand Down

0 comments on commit e47042c

Please sign in to comment.