Explorar el Código

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

David Cole hace 16 años
padre
commit
10a4abddfd
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 0
      Source/CPack/cmCPackArchiveGenerator.cxx
  2. 1 1
      Source/cmSystemTools.cxx

+ 1 - 0
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;
 }
 

+ 1 - 1
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;