Release memory correctly during ComCallWrapperTemplate::Cleanup (#16671)
authorLuqun Lou <luqunl@users.noreply.github.com>
Thu, 1 Mar 2018 06:26:00 +0000 (22:26 -0800)
committerJan Kotas <jkotas@microsoft.com>
Thu, 1 Mar 2018 06:26:00 +0000 (22:26 -0800)
Fixes #15632

src/vm/comcallablewrapper.cpp

index 322bcdc..5c2e187 100644 (file)
@@ -5398,7 +5398,7 @@ void ComCallWrapperTemplate::Cleanup()
     if (m_pIIDToInterfaceTemplateCache)
         delete m_pIIDToInterfaceTemplateCache;
 
-    delete[] this;
+    delete[] (BYTE*)this;
 }