nvmf/vfio-user: fix _free_ctrlr()
In _free_ctrlr(), ->endpoint can never be NULL, and the code was self-contradictory; assume it's not NULL. Signed-off-by: John Levon <john.levon@nutanix.com> Change-Id: I81a449123ca05f64460380dc3a8ad8af2143d166 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15831 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
05edb4d69b
commit
dda78a882f
@ -4253,7 +4253,7 @@ _free_ctrlr(void *ctx)
|
||||
struct nvmf_vfio_user_ctrlr *ctrlr = ctx;
|
||||
struct nvmf_vfio_user_endpoint *endpoint = ctrlr->endpoint;
|
||||
|
||||
free_sdbl(ctrlr->endpoint->vfu_ctx, ctrlr->sdbl);
|
||||
free_sdbl(endpoint->vfu_ctx, ctrlr->sdbl);
|
||||
|
||||
spdk_interrupt_unregister(&ctrlr->intr);
|
||||
ctrlr->intr_fd = -1;
|
||||
@ -4261,10 +4261,6 @@ _free_ctrlr(void *ctx)
|
||||
|
||||
free(ctrlr);
|
||||
|
||||
if (endpoint == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (endpoint->need_async_destroy) {
|
||||
nvmf_vfio_user_destroy_endpoint(endpoint);
|
||||
} else if (endpoint->need_relisten) {
|
||||
|
Loading…
Reference in New Issue
Block a user