app: add missed spdk_env_fini() call when exiting
Change-Id: I5cedf3754b512960808168dc50e36ab55f0c7c7e Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10910 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
parent
9ec9c8b33d
commit
58701cc4c5
@ -74,7 +74,7 @@ print_pci_dev(void *ctx, struct spdk_pci_device *dev)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int op;
|
||||
int op, rc = 0;
|
||||
struct spdk_env_opts opts;
|
||||
|
||||
while ((op = getopt(argc, argv, "h")) != -1) {
|
||||
@ -102,13 +102,16 @@ main(int argc, char **argv)
|
||||
|
||||
if (spdk_pci_enumerate(spdk_pci_nvme_get_driver(), pci_enum_cb, NULL)) {
|
||||
printf("Unable to enumerate PCI nvme driver\n");
|
||||
return 1;
|
||||
rc = 1;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
printf("\nList of available PCI devices:\n");
|
||||
spdk_pci_for_each_device(NULL, print_pci_dev);
|
||||
|
||||
exit:
|
||||
spdk_vmd_fini();
|
||||
spdk_env_fini();
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user