Fixed potential memory leak (dotnet/coreclr#21872)
authorOded Hanson <odhanson@microsoft.com>
Tue, 8 Jan 2019 17:34:25 +0000 (19:34 +0200)
committerMike McLaughlin <mikem@microsoft.com>
Tue, 8 Jan 2019 17:34:25 +0000 (09:34 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/d6bf5ed160e99b9a66087dcc8738f22a9a370121

src/coreclr/src/debug/di/rsmain.cpp

index f2f9b79..887cc33 100644 (file)
@@ -2118,6 +2118,7 @@ HRESULT Cordb::CreateObject(CorDebugInterfaceVersion iDebuggerVersion, DWORD pid
         cbMultiByte = WideCharToMultiByte(CP_ACP, 0, lpApplicationGroupId, -1, applicationGroupId, cbMultiByte, NULL, NULL);
         if (cbMultiByte == 0)
         {
+            delete [] applicationGroupId;
             return E_FAIL;
         }
     }