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

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