From dc7cefb6f24010990e3225f8082b68c890842687 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 10 Jun 2016 16:54:46 +0100 Subject: [PATCH] Fixed memory leak --- src/osgPlugins/zip/ZipArchive.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; + } } } }