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