oleaut32: Fix some memory leaks.

This commit is contained in:
Andrew Talbot 2007-10-01 21:33:07 +01:00 committed by Alexandre Julliard
parent 001d36b10e
commit edbcf7c215
1 changed files with 2 additions and 0 deletions

View File

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