From 8ff7d5679a2300d09e9296f7fdfa0a0db90043e9 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Wed, 13 Mar 2019 20:21:54 +0800
Subject: [PATCH 11/19] cov: pvscan ensure sigle_devs list is always
 initialized

---
 tools/pvscan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/pvscan.c b/tools/pvscan.c
index 2915db5..5a43069 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -315,6 +315,7 @@ static int _pvscan_cache(struct cmd_context *cmd, int argc, char **argv)
 	int add_errors = 0;
 	int ret = ECMD_PROCESSED;
 
+	dm_list_init(&single_devs);
 	dm_list_init(&found_vgnames);
 	dm_list_init(&pp.changed_vgnames);
 
@@ -443,8 +444,6 @@ static int _pvscan_cache(struct cmd_context *cmd, int argc, char **argv)
 	/* Creates a list of dev names from /dev, sysfs, etc; does not read any. */
 	dev_cache_scan();
 
-	dm_list_init(&single_devs);
-
 	while (argc--) {
 		pv_name = *argv++;
 		if (pv_name[0] == '/') {
-- 
2.19.1

