Skip to content

Commit

Permalink
Merge pull request #56 from imjfckm/fix-core-info
Browse files Browse the repository at this point in the history
Fix get_core_info trying to access already freed UUID
  • Loading branch information
micrakow authored Jun 28, 2019
2 parents 3df6dc4 + 506ff68 commit 3c94734
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions modules/cas_cache/layer_cache_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,8 +1831,10 @@ int cache_mngt_get_core_info(struct kcas_core_info *info)

uuid = ocf_core_get_uuid(core);

strlcpy(info->core_path_name, uuid->data,
min(sizeof(info->core_path_name), uuid->size));
if (uuid->data) {
strlcpy(info->core_path_name, uuid->data,
min(sizeof(info->core_path_name), uuid->size));
}

info->state = ocf_core_get_state(core);

Expand Down

0 comments on commit 3c94734

Please sign in to comment.