Fix cache_priv deallocation

Since cache_priv is allocated with vmalloc() it should be deallocated
with vfree().

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-08-16 05:13:11 +02:00
parent d87b2c6be7
commit 3983cea2b5

View File

@ -1984,7 +1984,7 @@ static int _cache_mngt_cache_priv_init(ocf_cache_t cache)
cache_priv->stop_context = cache_priv->stop_context =
env_malloc(sizeof(*cache_priv->stop_context), GFP_KERNEL); env_malloc(sizeof(*cache_priv->stop_context), GFP_KERNEL);
if (!cache_priv->stop_context) { if (!cache_priv->stop_context) {
kfree(cache_priv); vfree(cache_priv);
return -ENOMEM; return -ENOMEM;
} }