=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ole32: Don' t leak memory allocated by ProgIDFromCLSID (coverity).
Alexandre Julliard
julliard at winehq.org
Mon Oct 29 13:52:51 CDT 2012
Module: wine
Branch: master
Commit: fbe682a22a28996f5f9e2c7a892545887a52d3cf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbe682a22a28996f5f9e2c7a892545887a52d3cf
Author: André Hentschel <nerv at dawncrow.de>
Date: Sun Oct 28 16:16:45 2012 +0100
ole32: Don't leak memory allocated by ProgIDFromCLSID (coverity).
---
dlls/ole32/clipboard.c | 1 +
dlls/ole32/storage32.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
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);
}
}
More information about the wine-cvs
mailing list