Commit e55a3c94 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

lvol: fix lvol_req NULL check in spdk_lvol_destroy()



This was looking at req, but req had already been allocated and checked
for NULl previously; this line was intended to be checking lvol_req.

Change-Id: I8603d35fb4582c109e9d02f4964bbd6d21735324
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383312


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 830701b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -648,7 +648,7 @@ spdk_lvol_destroy(struct spdk_lvol *lvol, spdk_lvol_op_complete cb_fn, void *cb_
	}

	lvol_req = calloc(1, sizeof(*lvol_req));
	if (!req) {
	if (!lvol_req) {
		SPDK_ERRLOG("Cannot alloc memory for lvol request pointer\n");
		cb_fn(cb_arg, -ENOMEM);
		free(req);