[PATCH] Changed get_typeinfo to AddRef the COM pointer
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Tue Aug 12 18:13:42 CDT 2008
---
dlls/mshtml/dispex.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 4e44130..d3b0fc3 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -132,6 +132,8 @@ HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
}
*typeinfo = typeinfos[tid];
+
+ ITypeInfo_AddRef(typeinfos[tid]);
return S_OK;
}
@@ -228,6 +230,8 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This)
add_func_info(data, &size, *tid, funcdesc->memid, dti);
ITypeInfo_ReleaseFuncDesc(ti, funcdesc);
}
+
+ ITypeInfo_Release(ti);
tid++;
}
@@ -250,6 +254,8 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This)
data->name_table = NULL;
}
+ ITypeInfo_Release(dti);
+
return data;
}
@@ -362,7 +368,6 @@ static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo,
if(FAILED(hres))
return hres;
- ITypeInfo_AddRef(*ppTInfo);
return S_OK;
}
@@ -554,6 +559,8 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
}
hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr);
+
+ ITypeInfo_Release(ti);
IUnknown_Release(unk);
return hres;
--
1.5.4.1
--------------090508000504030309070702--
More information about the wine-patches
mailing list