bdevperf: explicit destroy the target when failing to alloc resource

The task resource is allocated one by one and when it fails
to allocate at some point, call the explicit destroy to release
the resource.

Change-Id: Ida916ed25a279806fee76104990f1f92daf3e1b6
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393009
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
GangCao 2017-12-26 18:41:36 -05:00 committed by Jim Harris
parent 331af9ea96
commit f95dacd504

View File

@ -674,6 +674,7 @@ bdevperf_run(void *arg1, void *arg2)
rc = bdevperf_construct_targets_tasks();
if (rc) {
blockdev_heads_destroy();
spdk_app_stop(1);
return;
}