Skip to content

Commit

Permalink
Set transition_map->states/transition size to 0 on fini
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Brawner <brawner@gmail.com>
  • Loading branch information
brawner committed Aug 12, 2020
1 parent 5e9c24d commit bf21179
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rcl_lifecycle/src/transition_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bf21179

Please sign in to comment.