Commit d9d66570 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32/recinfo: Use CRT allocation functions.

parent 078f4dcd
...@@ -179,9 +179,9 @@ static ULONG WINAPI IRecordInfoImpl_Release(IRecordInfo *iface) ...@@ -179,9 +179,9 @@ static ULONG WINAPI IRecordInfoImpl_Release(IRecordInfo *iface)
for(i=0; i<This->n_vars; i++) for(i=0; i<This->n_vars; i++)
SysFreeString(This->fields[i].name); SysFreeString(This->fields[i].name);
SysFreeString(This->name); SysFreeString(This->name);
HeapFree(GetProcessHeap(), 0, This->fields); free(This->fields);
ITypeInfo_Release(This->pTypeInfo); ITypeInfo_Release(This->pTypeInfo);
HeapFree(GetProcessHeap(), 0, This); free(This);
} }
return ref; return ref;
} }
...@@ -667,7 +667,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo ...@@ -667,7 +667,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
return E_INVALIDARG; return E_INVALIDARG;
} }
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(*ret)); ret = calloc(1, sizeof(*ret));
ret->IRecordInfo_iface.lpVtbl = &IRecordInfoImplVtbl; ret->IRecordInfo_iface.lpVtbl = &IRecordInfoImplVtbl;
ret->ref = 1; ret->ref = 1;
ret->pTypeInfo = pTypeInfo; ret->pTypeInfo = pTypeInfo;
...@@ -687,7 +687,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo ...@@ -687,7 +687,7 @@ HRESULT WINAPI GetRecordInfoFromTypeInfo(ITypeInfo* pTI, IRecordInfo** ppRecInfo
ret->name = NULL; ret->name = NULL;
} }
ret->fields = HeapAlloc(GetProcessHeap(), 0, ret->n_vars*sizeof(fieldstr)); ret->fields = calloc(ret->n_vars, sizeof(fieldstr));
for(i = 0; i<ret->n_vars; i++) { for(i = 0; i<ret->n_vars; i++) {
VARDESC *vardesc; VARDESC *vardesc;
hres = ITypeInfo_GetVarDesc(pTypeInfo, i, &vardesc); hres = ITypeInfo_GetVarDesc(pTypeInfo, i, &vardesc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment