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

This commit is contained in:
André Hentschel 2012-10-28 16:16:45 +01:00 committed by Alexandre Julliard
parent 4d796458d0
commit fbe682a22a
2 changed files with 2 additions and 0 deletions

View File

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

View File

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