Commit ab696ae1 authored by Jim Harris's avatar Jim Harris Committed by Changpeng Liu
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Iba92b1ae64453036829a67ab6f3dad970a368af0

Reviewed-on: https://review.gerrithub.io/c/442628


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent a206234d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}