nvmf: fix potential leak when processing multi-range deallocate command

Change-Id: Ic3a612ceed65799d16dae111db355333a1915187
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/403002
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Changpeng Liu 2018-03-07 00:54:06 -05:00 committed by Jim Harris
parent 3e717065d4
commit 0bce761614

View File

@ -307,9 +307,9 @@ nvmf_virtual_ctrlr_dsm_cpl(struct spdk_bdev_io *bdev_io, bool success,
if (unmap_ctx->count == 0) {
spdk_nvmf_request_complete(req);
spdk_bdev_free_io(bdev_io);
free(unmap_ctx);
}
spdk_bdev_free_io(bdev_io);
}
static int