From a13d2f7f706bc8d5a4ea103cde56bacea1dd82cc Mon Sep 17 00:00:00 2001
From: Stinson Linden <stinson@lindenlab.com>
Date: Tue, 20 May 2014 21:03:13 +0100
Subject: [PATCH] MAINT-4009: Patching a leak of LLPluginSharedMemory objects
 from the LLPluginProcessParent class.

---
 indra/llplugin/llpluginprocessparent.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index ea0d2b81f1b..b5a2588e1e7 100755
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -131,6 +131,8 @@ LLPluginProcessParent::~LLPluginProcessParent()
 	{
 		// destroy the shared memory region
 		iter->second->destroy();
+		delete iter->second;
+		iter->second = NULL;
 		
 		// and remove it from our map
 		mSharedMemoryRegions.erase(iter);
@@ -960,6 +962,8 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
 			{
 				// destroy the shared memory region
 				iter->second->destroy();
+				delete iter->second;
+				iter->second = NULL;
 				
 				// and remove it from our map
 				mSharedMemoryRegions.erase(iter);
-- 
GitLab