Skip to content

Commit

Permalink
Fixing bug in rosout teardown.
Browse files Browse the repository at this point in the history
  • Loading branch information
nburek committed Jan 11, 2019
1 parent 81f191f commit 810dc4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rcl/src/rcl/logging_rosout.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ rcl_ret_t rcl_logging_rosout_fini()
status = rcl_publisher_fini(&entry.publisher, entry.node);

if (RCL_RET_OK == status) {
const char * prev_key = key;
hashmap_ret = rcutils_hash_map_get_next_key_and_data(&__logger_map, NULL, &key, &entry);
RCL_RET_FROM_RCUTIL_RET(status, rcutils_hash_map_unset(&__logger_map, &key));
}

RCL_RET_FROM_RCUTIL_RET(status, rcutils_hash_map_unset(&__logger_map, &prev_key));
if (RCL_RET_OK == status) {
hashmap_ret = rcutils_hash_map_get_next_key_and_data(&__logger_map, NULL, &key, &entry);
}
}
if (RCUTILS_RET_HASH_MAP_NO_MORE_ENTRIES != hashmap_ret) {
Expand Down

0 comments on commit 810dc4e

Please sign in to comment.