Commit 3839e4b2 authored by Xiaotian Feng's avatar Xiaotian Feng Committed by Jens Axboe

block: fix improper kobject release in blk_integrity_unregister

blk_integrity_unregister should use kobject_put to release the kobject,
otherwise after bi is freed, memory of bi->kobj->name is leaked.
Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent a4e7d464
......@@ -379,6 +379,7 @@ void blk_integrity_unregister(struct gendisk *disk)
kobject_uevent(&bi->kobj, KOBJ_REMOVE);
kobject_del(&bi->kobj);
kobject_put(&bi->kobj);
kmem_cache_free(integrity_cachep, bi);
disk->integrity = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment