summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-05-09 12:36:59 (GMT)
committerBrad King <brad.king@kitware.com>2011-05-09 12:40:03 (GMT)
commitee9fc4b1d314d2c1804fec1286d9f317e9ed5a1b (patch)
tree9039505102c17818f0a55b152be37fa2a417ed80 /Source/kwsys
parentafa83eb4cfb19f4019e4199f17907d6c27f36cbf (diff)
downloadCMake-ee9fc4b1d314d2c1804fec1286d9f317e9ed5a1b.zip
CMake-ee9fc4b1d314d2c1804fec1286d9f317e9ed5a1b.tar.gz
CMake-ee9fc4b1d314d2c1804fec1286d9f317e9ed5a1b.tar.bz2
KWSys: Fix leaked FILE in EncodeExecutable error case
This leak was detected by cppcheck static analysis. Author: Hans Johnson <hans-johnson@uiowa.edu> Change-Id: I1b81cb245acb9a6033f24ecc8d1452ca4df8371a
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/EncodeExecutable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/kwsys/EncodeExecutable.c b/Source/kwsys/EncodeExecutable.c
index ba474b8..bc30568 100644
--- a/Source/kwsys/EncodeExecutable.c
+++ b/Source/kwsys/EncodeExecutable.c
@@ -41,6 +41,7 @@ int main(int argc, char* argv[])
if(!ofp)
{
fprintf(stderr, "Cannot open output file: \"%s\"\n", argv[2]);
+ fclose(ifp);
return 2;
}