Commit fbe682a2 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

ole32: Don't leak memory allocated by ProgIDFromCLSID (coverity).

parent 4d796458
......@@ -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 );
STORAGE_CreateOleStream(std.u.pstg, 0);
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)
{
*dwSize = WideCharToMultiByte(CP_ACP, 0, wstrProgID, -1, strProgID, *dwSize, NULL, FALSE);
CoTaskMemFree(wstrProgID);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment