bdev/crypto: unregister io_device on failure in examine callback
In vbdev_crypto_examine() we were failing to unregsiter the io_device in the event that spdk_vbdev_register() call failed. Found via inspection. Change-Id: I73c6c0c5693777b93c1ea02dcf2e2e65d46fe27d Signed-off-by: Paul Luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/432933 (master) Reviewed-on: https://review.gerrithub.io/435677 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
421dd2ea28
commit
126c22020a
@ -1589,6 +1589,7 @@ vbdev_crypto_examine(struct spdk_bdev *bdev)
|
||||
SPDK_ERRLOG("could not register crypto_bdev\n");
|
||||
spdk_bdev_close(crypto_bdev->base_desc);
|
||||
TAILQ_REMOVE(&g_vbdev_crypto, crypto_bdev, link);
|
||||
spdk_io_device_unregister(crypto_bdev, NULL);
|
||||
free(crypto_bdev->crypto_bdev.name);
|
||||
free(crypto_bdev->key);
|
||||
free(crypto_bdev);
|
||||
|
Loading…
Reference in New Issue
Block a user