mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
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>
This commit is contained in:
parent
9fe496116e
commit
601d39d00c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue