mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 10:11:52 -04:00
staging: zcache: fix memory leak
obj is not freed if __get_free_page() failed. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7a9f437af9
commit
69648bed53
@@ -790,6 +790,7 @@ static int zcache_do_preload(struct tmem_pool *pool)
|
||||
page = (void *)__get_free_page(ZCACHE_GFP_MASK);
|
||||
if (unlikely(page == NULL)) {
|
||||
zcache_failed_get_free_pages++;
|
||||
kmem_cache_free(zcache_obj_cache, obj);
|
||||
goto unlock_out;
|
||||
}
|
||||
preempt_disable();
|
||||
|
||||
Reference in New Issue
Block a user