From 67a171bba3e13565ef06ab69f2c4ac457717e7d2 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Mon, 11 Mar 2024 09:15:00 -0400 Subject: [PATCH] Adjust the check of the return value of pidfd_open in auditctl --- src/auditctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auditctl.c b/src/auditctl.c index 64e85e6ea..dac5118a1 100644 --- a/src/auditctl.c +++ b/src/auditctl.c @@ -425,8 +425,8 @@ static int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, static int sure_kill(int pid, int signal) { int rc = 0; - int pidfd; - if ((pidfd = pidfd_open(pid, 0) < 0)) + int pidfd = pidfd_open(pid, 0); + if (pidfd < 0) return -1; if (pidfd_send_signal(pidfd, signal, NULL, 0) < 0) { rc = -1;