From: arozansk@redhat.com
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac@vger.kernel.org, Aristeu Rozanski <arozansk@redhat.com>
Subject: [PATCH 1/3] rasdaemon: ras-report: fix possible but unlikely file descriptor leak
Date: Wed, 20 Jul 2022 10:39:58 -0400 [thread overview]
Message-ID: <20220720143957.868734458@redhat.com> (raw)
In-Reply-To: 20220720143957.795358633@redhat.com
Found with covscan.
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
diff --git a/ras-report.c b/ras-report.c
index ea3a9b6..0088745 100644
--- a/ras-report.c
+++ b/ras-report.c
@@ -768,7 +768,7 @@ int ras_report_mf_event(struct ras_events *ras, struct ras_mf_event *ev)
done = 1;
mf_fail:
- if (sockfd > 0)
+ if (sockfd >= 0)
close(sockfd);
if (done)
next prev parent reply other threads:[~2022-07-20 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 14:39 [PATCH 0/3] rasdaemon: misc fixes arozansk
2022-07-20 14:39 ` arozansk [this message]
2022-07-20 14:39 ` [PATCH 2/3] rasdaemon: mce-amd-smca: properly limit bank types arozansk
2022-07-20 14:40 ` [PATCH 3/3] rasdaemon: ras-memory-failure-handler: handle localtime() failure correctly arozansk
2022-07-20 15:33 ` Elliott, Robert (Servers)
2022-07-20 15:39 ` 'arozansk@redhat.com'
2022-07-20 15:40 ` [PATCH 3/3 v2] " arozansk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220720143957.868734458@redhat.com \
--to=arozansk@redhat.com \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.