linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: connector: ucon.c:  Cleaning up file resource leak
@ 2014-05-30 23:46 Rickard Strandqvist
  2014-06-03 22:55 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-05-30 23:46 UTC (permalink / raw)
  To: Randy Dunlap, Rickard Strandqvist
  Cc: David S. Miller, Mathias Krause, linux-doc, linux-kernel

Cleaning up a file resource leak

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 Documentation/connector/ucon.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
index 8a4da64..f09c6de 100644
--- a/Documentation/connector/ucon.c
+++ b/Documentation/connector/ucon.c
@@ -246,5 +246,7 @@ int main(int argc, char *argv[])
 	}
 
 	close(s);
+	if (stdout != out)
+		fclose(out);
 	return 0;
 }
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-03 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 23:46 [PATCH] Documentation: connector: ucon.c: Cleaning up file resource leak Rickard Strandqvist
2014-06-03 22:55 ` Randy Dunlap

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).