oleaut32: Fix some memory leaks
Andrew Talbot
andrew.talbot at talbotville.com
Mon Oct 1 15:33:07 CDT 2007
Changelog:
oleaut32: Fix some memory leaks.
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 1a30aa3..4a5ad89 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -967,6 +967,7 @@ deserialize_param(
hres = xbuf_get(buf,(LPBYTE)str,len*sizeof(WCHAR));
if (hres) {
ERR("Failed to read BSTR.\n");
+ HeapFree(GetProcessHeap(),0,str);
return hres;
}
*bstr = CoTaskMemAlloc(sizeof(BSTR *));
@@ -997,6 +998,7 @@ deserialize_param(
hres = xbuf_get(buf,(LPBYTE)str,len*sizeof(WCHAR));
if (hres) {
ERR("Failed to read BSTR.\n");
+ HeapFree(GetProcessHeap(),0,str);
return hres;
}
*arg = (DWORD)SysAllocStringLen(str,len);
More information about the wine-patches
mailing list