From 50e44b8fd06cd3af952b253249ab8e144d3296ec Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Wed, 13 Mar 2019 20:09:56 +0800
Subject: [PATCH 09/19] cov: make sure label scans valid lvinfo

---
 lib/label/label.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/label/label.c b/lib/label/label.c
index 5114959..86c84d8 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -991,7 +991,8 @@ void label_scan_invalidate_lv(struct cmd_context *cmd, struct logical_volume *lv
 	struct device *dev;
 	dev_t devt;
 
-	lv_info(cmd, lv, 0, &lvinfo, 0, 0);
+	if (!lv_info(cmd, lv, 0, &lvinfo, 0, 0))
+		return;
 	devt = MKDEV(lvinfo.major, lvinfo.minor);
 	if ((dev = dev_cache_get_by_devt(devt, NULL)))
 		label_scan_invalidate(dev);
-- 
2.19.1

