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 Jul 29, 2020
1 parent af438bc commit 5ee4d06
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 5ee4d06

Please sign in to comment.