Browse Source

Fix leak in dxc /recompile (#1085)

Tex Riddell 7 years ago
parent
commit
97a1b6bbee
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/clang/tools/dxc/dxc.cpp

+ 1 - 1
tools/clang/tools/dxc/dxc.cpp

@@ -726,7 +726,7 @@ void DxcContext::Recompile(IDxcBlob *pSource, IDxcLibrary *pLibrary, IDxcCompile
     IFT(pIncludeHandler->insertIncludeFile(pFileName, pBlobEncoding, dataLen));
     // Check if this file is the main file or included file
     if (wcscmp(pFileName, pMainFileName) == 0) {
-      pCompileSource = pBlobEncoding.Detach();
+      pCompileSource.Attach(pBlobEncoding.Detach());
     }
   }