From 3983cea2b561ef72f1a9124f9e081392ece83add Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Mon, 16 Aug 2021 05:13:11 +0200 Subject: [PATCH] Fix cache_priv deallocation Since cache_priv is allocated with vmalloc() it should be deallocated with vfree(). Signed-off-by: Robert Baldyga --- modules/cas_cache/layer_cache_management.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cas_cache/layer_cache_management.c b/modules/cas_cache/layer_cache_management.c index dc1b976..6c005a3 100644 --- a/modules/cas_cache/layer_cache_management.c +++ b/modules/cas_cache/layer_cache_management.c @@ -1984,7 +1984,7 @@ static int _cache_mngt_cache_priv_init(ocf_cache_t cache) cache_priv->stop_context = env_malloc(sizeof(*cache_priv->stop_context), GFP_KERNEL); if (!cache_priv->stop_context) { - kfree(cache_priv); + vfree(cache_priv); return -ENOMEM; }