From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 2/3] eject: close open file [cppcheck]
Date: Thu, 5 Apr 2012 22:40:48 +0200 [thread overview]
Message-ID: <1333658449-20112-2-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1333658449-20112-1-git-send-email-kerolasa@iki.fi>
[eject.c:498]: (error) Resource leak: f
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/eject.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 790ab3a..2056bf8 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -495,6 +495,7 @@ static int read_speed(const char *devname)
errx(EXIT_FAILURE,
_("%s: failed to read speed"),
_PATH_PROC_CDROMINFO);
+ fclose(f);
return atoi(str);
}
}
--
1.7.9.6
next prev parent reply other threads:[~2012-04-05 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 20:40 [PATCH 1/3] eject: inform why open failed Sami Kerola
2012-04-05 20:40 ` Sami Kerola [this message]
2012-04-10 10:33 ` [PATCH 2/3] eject: close open file [cppcheck] Karel Zak
2012-04-05 20:40 ` [PATCH 3/3] docs: eject.1: align with Documentation/howto-man-page.txt Sami Kerola
2012-04-10 10:33 ` Karel Zak
2012-04-10 10:32 ` [PATCH 1/3] eject: inform why open failed Karel Zak
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=1333658449-20112-2-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox