diff --git a/src/osgPlugins/zip/ZipArchive.cpp b/src/osgPlugins/zip/ZipArchive.cpp index 44f249f66..dfe8c139c 100644 --- a/src/osgPlugins/zip/ZipArchive.cpp +++ b/src/osgPlugins/zip/ZipArchive.cpp @@ -461,6 +461,11 @@ void ZipArchive::IndexZipFiles(HZIP hz) { _zipIndex.insert(ZipEntryMapping(name, ze)); } + else + { + // ze isn't being used to delete it + delete ze; + } } } }