Set transition_map->states/transition size to 0 on fini (#729) (#821)

Signed-off-by: Stephen Brawner <brawner@gmail.com>
This commit is contained in:
brawner 2020-10-05 13:30:57 -07:00 committed by GitHub
parent c4e690c92a
commit 34107decc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}