* [PATCH] connector - documentation: close opened file descriptor
@ 2014-09-17 17:15 Valentin Ilie
0 siblings, 0 replies; only message in thread
From: Valentin Ilie @ 2014-09-17 17:15 UTC (permalink / raw)
To: rdunlap, davem, minipli; +Cc: linux-doc, linux-kernel, Valentin Ilie
For the logging process, we use either a file or stdout.
In the case of a file, we need to fix that by calling fclose at the right time.
In the case we end up calling fclose to stdout, we will not impact the program because we do it at its very end.
Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
---
Documentation/connector/ucon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
index 8a4da64..f9d785b 100644
--- a/Documentation/connector/ucon.c
+++ b/Documentation/connector/ucon.c
@@ -246,5 +246,6 @@ int main(int argc, char *argv[])
}
close(s);
+ fclose(out);
return 0;
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-17 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17 17:15 [PATCH] connector - documentation: close opened file descriptor Valentin Ilie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®