[PATCH 6/7] fixup "multipath-tools tests: check if /sys/dev/block is non-empty"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxxx>

Don't run closedir() if opendir() failed.

Fixes: "multipath-tools tests: check if /sys/dev/block is non-empty"
Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 tests/devt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/devt.c b/tests/devt.c
index d971302..0ad100a 100644
--- a/tests/devt.c
+++ b/tests/devt.c
@@ -37,8 +37,8 @@ static bool sys_dev_block_exists(void)
 				break;
 			}
 		}
+		closedir(dir);
 	}
-	closedir(dir);
 	return rc;
 }
 
-- 
2.30.1


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux