ole32: Don't leak memory allocated by ProgIDFromCLSID (coverity).
This commit is contained in:
parent
4d796458d0
commit
fbe682a22a
|
@ -664,6 +664,7 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
|
||||||
WideCharToMultiByte( CP_ACP, 0, strProgID, -1, strOleTypeName, sizeof(strOleTypeName), NULL, NULL );
|
WideCharToMultiByte( CP_ACP, 0, strProgID, -1, strOleTypeName, sizeof(strOleTypeName), NULL, NULL );
|
||||||
STORAGE_CreateOleStream(std.u.pstg, 0);
|
STORAGE_CreateOleStream(std.u.pstg, 0);
|
||||||
OLECONVERT_CreateCompObjStream(std.u.pstg, strOleTypeName);
|
OLECONVERT_CreateCompObjStream(std.u.pstg, strOleTypeName);
|
||||||
|
CoTaskMemFree(strProgID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9075,6 +9075,7 @@ static HRESULT OLECONVERT_GetOLE10ProgID(LPSTORAGE pStorage, char *strProgID, DW
|
||||||
if(hRes == S_OK)
|
if(hRes == S_OK)
|
||||||
{
|
{
|
||||||
*dwSize = WideCharToMultiByte(CP_ACP, 0, wstrProgID, -1, strProgID, *dwSize, NULL, FALSE);
|
*dwSize = WideCharToMultiByte(CP_ACP, 0, wstrProgID, -1, strProgID, *dwSize, NULL, FALSE);
|
||||||
|
CoTaskMemFree(wstrProgID);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue