Blob Blame History Raw
From 869f514310b72169a294baa37f5a90a291f719f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 23 Aug 2018 11:51:47 +0200
Subject: [PATCH 3/3] xqmstats: Fix a file descriptor leak in main()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 xqmstats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xqmstats.c b/xqmstats.c
index cdac4a6..59b1d66 100644
--- a/xqmstats.c
+++ b/xqmstats.c
@@ -35,6 +35,7 @@ int main(int argc, char **argv)
 	if ((stats = fopen(XQMSTATS, "r")) == NULL) {
 		if ((stats = fopen(STATFILE, "r")) == NULL) {
 			errstr(_("The running kernel does not support XFS\n"));
+			fclose(xqm);
 			return 1;
 		}
 	}
-- 
2.14.4