From bf211791d66f8c8103f23cbde413ec435aa7efe1 Mon Sep 17 00:00:00 2001 From: Stephen Brawner Date: Tue, 28 Jul 2020 18:17:02 -0700 Subject: [PATCH] Set transition_map->states/transition size to 0 on fini Signed-off-by: Stephen Brawner --- rcl_lifecycle/src/transition_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rcl_lifecycle/src/transition_map.c b/rcl_lifecycle/src/transition_map.c index aa5ac51f5..97562dc2b 100644 --- a/rcl_lifecycle/src/transition_map.c +++ b/rcl_lifecycle/src/transition_map.c @@ -70,9 +70,11 @@ rcl_lifecycle_transition_map_fini( // free the primary states allocator->deallocate(transition_map->states, allocator->state); transition_map->states = NULL; + transition_map->states_size = 0; // free the tansitions allocator->deallocate(transition_map->transitions, allocator->state); transition_map->transitions = NULL; + transition_map->transitions_size = 0; return fcn_ret; }