diff options
author | Joonsoo Kim <js1304@gmail.com> | 2012-05-10 17:32:59 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-05-16 08:37:25 +0200 |
commit | 601d39d00c2af206d10d1252132a85316d95499a (patch) | |
tree | 49cba676d0106e6310b3a5dc560f2b477fd79fea /mm/slub.c | |
parent | Documentations: Fix slabinfo.c directory in vm/slub.txt (diff) | |
download | linux-601d39d00c2af206d10d1252132a85316d95499a.tar.xz linux-601d39d00c2af206d10d1252132a85316d95499a.zip |
slub: fix a possible memory leak
Memory allocated by kstrdup should be freed,
when kmalloc(kmem_size, GFP_KERNEL) is failed.
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index 18bf13eac54b..60119f78ccc0 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3968,9 +3968,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, } return s; } - kfree(n); kfree(s); } + kfree(n); err: up_write(&slub_lock); |