소스 검색

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());
     }
   }