Blame SOURCES/0021-semodule-utils-Fix-RESOURCE_LEAK-coverity-scan-defec.patch

5b70e6
From d6476f30ddaf384ed7f563ca4ad31cbfc7ad6bbd Mon Sep 17 00:00:00 2001
5b70e6
From: Petr Lautrbach <plautrba@redhat.com>
5b70e6
Date: Thu, 8 Nov 2018 09:20:58 +0100
5b70e6
Subject: [PATCH] semodule-utils: Fix RESOURCE_LEAK coverity scan defects
5b70e6
5b70e6
---
5b70e6
 semodule-utils/semodule_package/semodule_package.c | 1 +
5b70e6
 1 file changed, 1 insertion(+)
5b70e6
5b70e6
diff --git a/semodule-utils/semodule_package/semodule_package.c b/semodule-utils/semodule_package/semodule_package.c
5b70e6
index 3515234e36de..7b75b3fd9bb4 100644
5b70e6
--- a/semodule-utils/semodule_package/semodule_package.c
5b70e6
+++ b/semodule-utils/semodule_package/semodule_package.c
5b70e6
@@ -74,6 +74,7 @@ static int file_to_data(const char *path, char **data, size_t * len)
5b70e6
 	}
5b70e6
 	if (!sb.st_size) {
5b70e6
 		*len = 0;
5b70e6
+		close(fd);
5b70e6
 		return 0;
5b70e6
 	}
5b70e6
 
5b70e6
-- 
5b70e6
2.32.0
5b70e6