diff options
author | Bo Rydberg <kitware@rydb3rg.com> | 2020-03-01 22:40:41 (GMT) |
---|---|---|
committer | Bo Rydberg <kitware@rydb3rg.com> | 2020-03-01 22:40:41 (GMT) |
commit | 59530d9decf1a7aefc57a43085a80454adfa9958 (patch) | |
tree | 872ee947ede7752a57271d3426bee208231a6122 | |
parent | 61596e1cc861f975ec822f72d34842674b388646 (diff) | |
download | CMake-59530d9decf1a7aefc57a43085a80454adfa9958.zip CMake-59530d9decf1a7aefc57a43085a80454adfa9958.tar.gz CMake-59530d9decf1a7aefc57a43085a80454adfa9958.tar.bz2 |
cmGeneratedFileStream: File resource leak if oldname not found
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 2af04b6..f76e205 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -180,6 +180,7 @@ int cmGeneratedFileStreamBase::CompressFile(std::string const& oldname, } FILE* ifs = cmsys::SystemTools::Fopen(oldname, "r"); if (!ifs) { + gzclose(gf); return 0; } size_t res; |