projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a9f437
)
staging: zcache: fix memory leak
author
Vasiliy Kulikov
<segoon@openwall.com>
Thu, 10 Feb 2011 18:00:39 +0000
(21:00 +0300)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 18 Feb 2011 21:24:53 +0000
(13:24 -0800)
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>
drivers/staging/zcache/zcache.c
patch
|
blob
|
history
diff --git
a/drivers/staging/zcache/zcache.c
b/drivers/staging/zcache/zcache.c
index
61be849
..
b8a2b30
100644
(file)
--- a/
drivers/staging/zcache/zcache.c
+++ b/
drivers/staging/zcache/zcache.c
@@
-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();