lvol: don't pass lvs to cb_fn after it was freed

Change-Id: I6d3669bc19b51fd72af7ea27aa4d2a88dee59e58
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382509
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-10-13 14:27:22 -07:00 committed by Jim Harris
parent a0488989e5
commit 904f3aa1e1

View File

@ -55,7 +55,10 @@ _spdk_super_create_close_cb(void *cb_arg, int lvolerrno)
if (lvolerrno < 0) {
SPDK_ERRLOG("Lvol store init failed: could not close super blob\n");
req->cb_fn(req->cb_arg, NULL, lvolerrno);
free(lvs);
free(req);
return;
}
req->cb_fn(req->cb_arg, lvs, lvolerrno);