bdevperf: remove extra blockdev_heads_destroy() in failure path

The stop handler already calls blockdev_heads_destroy(), so we
don't need to call it if bdevperf_construct_targets_tasks()
fails.  Calling it twice actually results in double-frees and
other types of memory corruption.

Fixes #592.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iba92b1ae64453036829a67ab6f3dad970a368af0

Reviewed-on: https://review.gerrithub.io/c/442628
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2019-01-29 13:49:23 -07:00 committed by Changpeng Liu
parent a206234d09
commit ab696ae1cf

View File

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