Merge pull request #132 from arutk/secure_alloc_dynamic

Use secure alloc in _raw_dynamic_get_item
This commit is contained in:
Michal Rakowski 2019-04-18 21:17:03 +02:00 committed by GitHub
commit 9f927de841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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