audit/backport-adding-the-file-descriptor-closure.patch
2024-07-23 11:08:29 +08:00

28 lines
747 B
Diff

From 5eef876b3eb2fa3348be6cd31bd651a98b164deb Mon Sep 17 00:00:00 2001
From: Yugend <jugendd@mail.ru>
Date: Wed, 27 Mar 2024 17:34:33 +0300
Subject: [PATCH] adding the file descriptor closure
Reference:https://github.com/linux-audit/audit-userspace/commit/5eef876b3eb2fa3348be6cd31bd651a98b164deb
Conflict:NA
---
src/auditctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/auditctl.c b/src/auditctl.c
index 81ca2b8..0d70212 100644
--- a/src/auditctl.c
+++ b/src/auditctl.c
@@ -1327,6 +1327,7 @@ static int fileopt(const char *file)
fields = malloc(nf * sizeof(char *));
if (fields == NULL) {
audit_msg(LOG_ERR, "Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+ fclose(f);
return 1;
}
--
2.33.0