Blame SOURCES/quota-4.04-quotackeck-Fix-a-directory-descriptor-leak-in-scan_d.patch

273bc0
From 0f255ef2570478a855361937445a57a168c8629d Mon Sep 17 00:00:00 2001
273bc0
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
273bc0
Date: Thu, 23 Aug 2018 11:23:43 +0200
273bc0
Subject: [PATCH 2/3] quotackeck: Fix a directory descriptor leak in scan_dir()
273bc0
MIME-Version: 1.0
273bc0
Content-Type: text/plain; charset=UTF-8
273bc0
Content-Transfer-Encoding: 8bit
273bc0
273bc0
Signed-off-by: Petr Písař <ppisar@redhat.com>
273bc0
---
273bc0
 quotacheck.c | 1 +
273bc0
 1 file changed, 1 insertion(+)
273bc0
273bc0
diff --git a/quotacheck.c b/quotacheck.c
273bc0
index fd01dfc..2cdf475 100644
273bc0
--- a/quotacheck.c
273bc0
+++ b/quotacheck.c
273bc0
@@ -538,6 +538,7 @@ static int scan_dir(const char *pathname)
273bc0
 		if ((lstat(de->d_name, &st)) == -1) {
273bc0
 			errstr(_("lstat: Cannot stat `%s/%s': %s\nGuess you'd better run fsck first !\nexiting...\n"),
273bc0
 				pathname, de->d_name, strerror(errno));
273bc0
+			closedir(dp);
273bc0
 			goto out;
273bc0
 		}
273bc0
 
273bc0
-- 
273bc0
2.14.4
273bc0