ole32: Don't leak memory allocated by ProgIDFromCLSID (coverity)
André Hentschel
nerv at dawncrow.de
Sun Oct 28 10:16:45 CDT 2012
CID 713612 & 713624
---
dlls/ole32/clipboard.c | 1 +
dlls/ole32/storage32.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 57b0c46..a7308c2 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -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);
}
}
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 70494a1..d2e9f69 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -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);
}
}
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list