Blame SOURCES/0049-partprobe-always-close-dev-when-probing-disks.patch

fc4a62
From da41227259c5e301e26a9983b714e521d4599575 Mon Sep 17 00:00:00 2001
fc4a62
From: "Brian C. Lane" <bcl@redhat.com>
fc4a62
Date: Mon, 25 Feb 2019 16:07:39 -0800
fc4a62
Subject: [PATCH 49/50] partprobe: always close dev when probing disks
fc4a62
fc4a62
Resolves: rhbz#1551411
fc4a62
---
fc4a62
 partprobe/partprobe.c | 3 ++-
fc4a62
 1 file changed, 2 insertions(+), 1 deletion(-)
fc4a62
fc4a62
diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
fc4a62
index c5260c6..ccda141 100644
fc4a62
--- a/partprobe/partprobe.c
fc4a62
+++ b/partprobe/partprobe.c
fc4a62
@@ -113,7 +113,7 @@ process_dev (PedDevice* dev)
fc4a62
 
fc4a62
 	disk_type = ped_disk_probe (dev);
fc4a62
 	if (!disk_type || !strcmp (disk_type->name, "loop"))
fc4a62
-		return 1;
fc4a62
+		goto skip_dev;
fc4a62
 
fc4a62
 	disk = ped_disk_new (dev);
fc4a62
 	if (!disk)
fc4a62
@@ -125,6 +125,7 @@ process_dev (PedDevice* dev)
fc4a62
 	if (opt_summary)
fc4a62
 		summary (disk);
fc4a62
 	ped_disk_destroy (disk);
fc4a62
+skip_dev:
fc4a62
 	ped_device_close (dev);
fc4a62
 	return 1;
fc4a62
 
fc4a62
-- 
fc4a62
2.20.1
fc4a62