Skip to content

Commit

Permalink
Merge pull request #132 from arutk/secure_alloc_dynamic
Browse files Browse the repository at this point in the history
Use secure alloc in _raw_dynamic_get_item
  • Loading branch information
micrakow committed Apr 18, 2019
2 parents d3bfbf6 + c7df916 commit 9f927de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/metadata/metadata_raw_dynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ static void *_raw_dynamic_get_item(ocf_cache_t cache,

OCF_DEBUG_PARAM(cache, "New page allocation - %u", page);

new = env_zalloc(PAGE_SIZE, ENV_MEM_NORMAL);
new = env_secure_alloc(PAGE_SIZE);
if (new) {
ENV_BUG_ON(env_memset(new, PAGE_SIZE, 0));
ctrl->pages[page] = new;
env_atomic_inc(&ctrl->count);
}
Expand Down

0 comments on commit 9f927de

Please sign in to comment.