slub: release kobject if sysfs_create_group failed in sysfs_slab_add
When CONFIG_SLUB_DEBUG is enabled, sysfs_slab_add should unlink and put the kobject if sysfs_create_group failed. Otherwise, sysfs_slab_add returns error then free kmem_cache s, thus memory of s->kobj is leaked. Acked-by: NChristoph Lameter <cl@linux-foundation.org> Signed-off-by: NXiaotian Feng <dfeng@redhat.com> Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
Showing
想要评论请 注册 或 登录