summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-12-28 18:15:19 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-12-28 18:15:19 (GMT)
commit10a4abddfd782a75afbd85b50087f5b9deea6dcc (patch)
tree1986323a5b686a3a0bc498adf70b778fb8e7bc8c
parent9e96d80b24a925f3718998335e27df537c455cf7 (diff)
downloadCMake-10a4abddfd782a75afbd85b50087f5b9deea6dcc.zip
CMake-10a4abddfd782a75afbd85b50087f5b9deea6dcc.tar.gz
CMake-10a4abddfd782a75afbd85b50087f5b9deea6dcc.tar.bz2
Add missing archive_read_finish calls to fix some of the presently reported valgrind memory leaks.
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx1
-rw-r--r--Source/cmSystemTools.cxx2
2 files changed, 2 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index ba221a3..a52d05e 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -254,6 +254,7 @@ int cmCPackArchiveGenerator::CompressFiles(const char* outFileName,
// close the archive and finish the write
archive_write_close(a);
archive_write_finish(a);
+ archive_read_finish(disk);
return 1;
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 351e1b1..d176987 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1852,9 +1852,9 @@ bool cmSystemTools::CreateTar(const char* outFileName,
}
archive_entry_free(entry);
}
- // close the archive and finish the write
archive_write_close(a);
archive_write_finish(a);
+ archive_read_finish(disk);
return true;
#else
(void)outFileName;