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: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/383312 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
830701b498
commit
e55a3c9450
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user