diff options
author | Slava Semushin <php-coder@altlinux.ru> | 2009-05-23 01:10:05 +0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-05-26 09:39:54 +0200 |
commit | 192a2ae30dea7463cc0e13500e80352144cfa1a0 (patch) | |
tree | 6d7f925395ab8514dd20e8648ae0da0705ed52e4 | |
parent | 5a929c3488e495083bfc687f3cfd36b818136b0e (diff) | |
download | samba-192a2ae30dea7463cc0e13500e80352144cfa1a0.tar.gz samba-192a2ae30dea7463cc0e13500e80352144cfa1a0.tar.xz samba-192a2ae30dea7463cc0e13500e80352144cfa1a0.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
(cherry picked from commit 8987ca29062db53db117d6c9d9ce2ad01ed17d22)
-rw-r--r-- | source3/utils/log2pcaphex.c | 8 |
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; } |