Add missing archive_read_finish calls to fix some of the presently reported valgrind memory leaks.

This commit is contained in:
David Cole 2009-12-28 13:15:19 -05:00
parent 9e96d80b24
commit 10a4abddfd
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;