From 5eef876b3eb2fa3348be6cd31bd651a98b164deb Mon Sep 17 00:00:00 2001 From: Yugend Date: Wed, 27 Mar 2024 17:34:33 +0300 Subject: [PATCH] adding the file descriptor closure Conflict:NA Reference:https://github.com/linux-audit/audit-userspace/commit/5eef876b3eb2fa3348be6cd31bd651a98b164deb --- src/auditctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auditctl.c b/src/auditctl.c index 503b4e2b..7949d95c 100644 --- a/src/auditctl.c +++ b/src/auditctl.c @@ -1393,6 +1393,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