changeset 2725:7caf01aa4d7b jobs

Fix memory leak introduced by changeset #99116ed6f38c in Orthanc 1.3.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Jul 2018 16:07:56 +0200
parents c8d369400ae1
children 46061a91c88a
files Core/Cache/MemoryCache.cpp NEWS
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Cache/MemoryCache.cpp	Thu Jul 12 15:54:37 2018 +0200
+++ b/Core/Cache/MemoryCache.cpp	Thu Jul 12 16:07:56 2018 +0200
@@ -80,9 +80,12 @@
 
   void MemoryCache::Invalidate(const std::string& id)
   {
-    if (index_.Contains(id))
+    Page* p = NULL;
+    if (index_.Contains(id, p))
     {
       VLOG(1) << "Invalidating a cache page";
+      assert(p != NULL);
+      delete p;
       index_.Invalidate(id);
     }
   }
--- a/NEWS	Thu Jul 12 15:54:37 2018 +0200
+++ b/NEWS	Thu Jul 12 16:07:56 2018 +0200
@@ -51,6 +51,7 @@
 * Fix issue 25 (Deadlock with Lua scripts): The event queue is now implemented for Lua
 * Fix issue 94 (Instance modification should not modify FrameOfReferenceUID)
 * Fix issue 77 (Lua access to REST-API is null terminated)
+* Fix memory leak introduced by changeset #99116ed6f38c in Orthanc 1.3.2
 * Upgraded dependencies for static and Windows builds:
   - boost 1.67.0
   - openssl 1.0.2o