From 326237c4dd3bb03865a3510296aa925e22ea3302 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sat, 23 May 2009 01:10:05 +0700 Subject: source3/utils/log2pcaphex.c(main): fixed file descriptors leak. One of leaks found by cppcheck: [./source3/utils/log2pcaphex.c:367]: (error) Resource leak: out --- source3/utils/log2pcaphex.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c index 072d659bf0..b1a8a27c22 100644 --- a/source3/utils/log2pcaphex.c +++ b/source3/utils/log2pcaphex.c @@ -364,5 +364,13 @@ int main (int argc, char **argv) } } + if (in != stdin) { + fclose(in); + } + + if (out != stdout) { + fclose(out); + } + return 0; } -- cgit