From 15733ed8cf53d6e6c2d5f0f6b1555def0706fbec Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Fri, 16 Nov 2018 02:00:42 +0000 Subject: [PATCH] gsdx: Fix memory leak The memory was allocated with new so it should be freed with delete and not _aligned_free. Fixes the destructors not being called. --- plugins/GSdx/GSLocalMemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/GSdx/GSLocalMemory.cpp b/plugins/GSdx/GSLocalMemory.cpp index 1210379dce..76477dbbfd 100644 --- a/plugins/GSdx/GSLocalMemory.cpp +++ b/plugins/GSdx/GSLocalMemory.cpp @@ -494,7 +494,7 @@ GSLocalMemory::~GSLocalMemory() else vmfree(m_vm8, m_vmsize * 4); - for(auto &i : m_omap) _aligned_free(i.second); + for(auto &i : m_omap) delete i.second; for(auto &i : m_pomap) _aligned_free(i.second); for(auto &i : m_po4map) _aligned_free(i.second);