Skip to content

Commit 07bf1ae

Browse files
authored
Fix leak of FixedSizeMemoryStream object from DxilConv (#4483)
1 parent f1bde42 commit 07bf1ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

projects/dxilconv/lib/DxbcConverter/DxbcConverter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ void DxbcConverter::ConvertImpl(_In_reads_bytes_(DxbcSize) LPCVOID pDxbc,
332332
CComPtr<AbstractMemoryStream> pOutputStream;
333333
IFT(CreateFixedSizeMemoryStream((LPBYTE)pOutput.m_pData, OutputSize, &pOutputStream));
334334
pContainerWriter->write(pOutputStream);
335-
pOutputStream.Detach();
335+
// pOutputStream does not own the buffer; allow CComPtr to clean up the stream object.
336336

337337
*ppDxil = pOutput.Detach();
338338
*pDxilSize = OutputSize;

0 commit comments

Comments
 (0)