Module: wine Branch: master Commit: edbcf7c215219d1c51d9a163fef09fb6dcac5161 URL: http://source.winehq.org/git/wine.git/?a=commit;h=edbcf7c215219d1c51d9a163fe...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Mon Oct 1 21:33:07 2007 +0100
oleaut32: Fix some memory leaks.
---
dlls/oleaut32/tmarshal.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
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);