浏览代码

Fix leak in dxc /recompile (#1085)

Tex Riddell 7 年之前
父节点
当前提交
97a1b6bbee
共有 1 个文件被更改,包括 1 次插入1 次删除
  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());
     }
   }