diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 06f081e92046ff1af0aaf983511c253c3d7e4a60..a1b4fd1035db20fecc5e264e4b9620719bb7d066 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -542,6 +542,10 @@ bool LLAppViewerWin32::cleanup()
 
 	gDXHardware.cleanup();
 
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+	LLWinDebug::instance().cleanup();
+#endif
+
 	return result;
 }
 
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 551d0be8d760ff9ae031e5b8e0a33b3275d966a9..eff70ca0b2853bd3aab295aa6356cea3a0370aef 100755
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -45,7 +45,7 @@ class LLMemoryReserve {
 	~LLMemoryReserve();
 	void reserve();
 	void release();
-protected:
+private:
 	unsigned char *mReserve;
 	static const size_t MEMORY_RESERVATION_SIZE;
 };
@@ -53,7 +53,7 @@ class LLMemoryReserve {
 LLMemoryReserve::LLMemoryReserve() :
 	mReserve(NULL)
 {
-};
+}
 
 LLMemoryReserve::~LLMemoryReserve()
 {
@@ -66,14 +66,19 @@ const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024;
 void LLMemoryReserve::reserve()
 {
 	if(NULL == mReserve)
+	{
 		mReserve = new unsigned char[MEMORY_RESERVATION_SIZE];
-};
+	}
+}
 
 void LLMemoryReserve::release()
 {
-	delete [] mReserve;
+	if (NULL != mReserve)
+	{
+		delete [] mReserve;
+	}
 	mReserve = NULL;
-};
+}
 
 static LLMemoryReserve gEmergencyMemoryReserve;
 
@@ -130,6 +135,11 @@ void  LLWinDebug::init()
 	}
 }
 
+void LLWinDebug::cleanup ()
+{
+	gEmergencyMemoryReserve.release();
+}
+
 void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename)
 {
 	// Temporary fix to switch out the code that writes the DMP file.
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index 6f274c6f162d400339ce4f12573c07c3fa20425f..a3cbf6dc036cde80da35f5c19d5c20dffbec2f89 100755
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -37,6 +37,7 @@ class LLWinDebug:
 public:
 	static void init();
 	static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL);
+	static void cleanup();
 private:
 	static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename);
 };