summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorSlava Semushin <php-coder@altlinux.ru>2009-05-23 01:10:05 +0700
committerVolker Lendecke <vl@samba.org>2009-05-25 16:25:57 +0200
commit326237c4dd3bb03865a3510296aa925e22ea3302 (patch)
treec8206db4c9b31ed4263a9209e82f81e504c28297 /source3
parent5d2cd816459a30107b4ea011c1874b051aa29b1c (diff)
downloadsamba-326237c4dd3bb03865a3510296aa925e22ea3302.tar.gz
samba-326237c4dd3bb03865a3510296aa925e22ea3302.tar.xz
samba-326237c4dd3bb03865a3510296aa925e22ea3302.zip
source3/utils/log2pcaphex.c(main): fixed file descriptors leak.
One of leaks found by cppcheck: [./source3/utils/log2pcaphex.c:367]: (error) Resource leak: out
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/log2pcaphex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/log2pcaphex.c b/source3/utils/log2pcaphex.c
index 072d659bf0d..b1a8a27c228 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;
}