UT/Part: unregister the bdev when cleaning up

Fix issue: #2638

Change-Id: Icfae394fcf8f00e5c9713a78cf04e4604512b9fa
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14063
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Kan Kuo <kuox.kan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
GangCao 2022-08-16 10:17:05 -04:00 committed by Tomasz Zawadzki
parent 2eaae37ded
commit 40d89d602e

View File

@ -49,6 +49,7 @@ spdk_memory_domain_push_data(struct spdk_memory_domain *dst_domain, void *dst_do
static void
_part_cleanup(struct spdk_bdev_part *part)
{
spdk_io_device_unregister(part, NULL);
free(part->internal.bdev.name);
free(part->internal.bdev.product_name);
}