bdev/nvme: use stop_discovery in module_fini
Using stop_discovery() will also free the entry contexts tied to that discovery service. It's not a big deal to leave them, as module_fini is usually called on app shutdown, but this gets rid of asan reporting memory leaks. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I81fc843708694791a5846c24cbde4b32e0fa7287 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12683 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
82889ba8e5
commit
0aa212bddb
@ -5356,8 +5356,7 @@ bdev_nvme_library_fini(void)
|
||||
bdev_nvme_fini_destruct_ctrlrs();
|
||||
} else {
|
||||
TAILQ_FOREACH(ctx, &g_discovery_ctxs, tailq) {
|
||||
ctx->stop = true;
|
||||
ctx->stop_cb_fn = check_discovery_fini;
|
||||
stop_discovery(ctx, check_discovery_fini, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user