* [PATCH] [IA64] aliasing-test: Remember to close fd on error in read_rom()
@ 2012-07-20 19:12 Jesper Juhl
0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2012-07-20 19:12 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Rob Landley, linux-doc, linux-kernel
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
Documentation/ia64/aliasing-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 5caa2af..62a190d 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -132,6 +132,7 @@ static int read_rom(char *path)
rc = write(fd, "1", 2);
if (rc <= 0) {
+ close(fd);
perror("write");
return -1;
}
--
1.7.11.2
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-20 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 19:12 [PATCH] [IA64] aliasing-test: Remember to close fd on error in read_rom() Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).