xmllite/tests: Use CRT allocation functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dbd4f9e91d
commit
ff09cb4f30
|
@ -30,7 +30,6 @@
|
|||
#include "ole2.h"
|
||||
#include "xmllite.h"
|
||||
#include "wine/test.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
|
||||
|
||||
|
@ -383,12 +382,12 @@ static ULONG WINAPI testinput_AddRef(IUnknown *iface)
|
|||
|
||||
static ULONG WINAPI testinput_Release(IUnknown *iface)
|
||||
{
|
||||
testinput *This = impl_from_IUnknown(iface);
|
||||
testinput *input = impl_from_IUnknown(iface);
|
||||
LONG ref;
|
||||
|
||||
ref = InterlockedDecrement(&This->ref);
|
||||
ref = InterlockedDecrement(&input->ref);
|
||||
if (ref == 0)
|
||||
heap_free(This);
|
||||
free(input);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
@ -404,7 +403,7 @@ static HRESULT testinput_createinstance(void **ppObj)
|
|||
{
|
||||
testinput *input;
|
||||
|
||||
input = heap_alloc(sizeof(*input));
|
||||
input = malloc(sizeof(*input));
|
||||
if(!input) return E_OUTOFMEMORY;
|
||||
|
||||
input->IUnknown_iface.lpVtbl = &testinput_vtbl;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "ole2.h"
|
||||
#include "xmllite.h"
|
||||
|
||||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
#include "initguid.h"
|
||||
|
@ -100,7 +99,7 @@ static WCHAR *strdupAtoW(const char *str)
|
|||
|
||||
if (!str) return ret;
|
||||
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
ret = heap_alloc(len * sizeof(WCHAR));
|
||||
ret = malloc(len * sizeof(WCHAR));
|
||||
if (ret)
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
return ret;
|
||||
|
@ -843,9 +842,9 @@ static HRESULT write_start_element(IXmlWriter *writer, const char *prefix, const
|
|||
|
||||
hr = IXmlWriter_WriteStartElement(writer, prefixW, localW, uriW);
|
||||
|
||||
heap_free(prefixW);
|
||||
heap_free(localW);
|
||||
heap_free(uriW);
|
||||
free(prefixW);
|
||||
free(localW);
|
||||
free(uriW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -863,10 +862,10 @@ static HRESULT write_element_string(IXmlWriter *writer, const char *prefix, cons
|
|||
|
||||
hr = IXmlWriter_WriteElementString(writer, prefixW, localW, uriW, valueW);
|
||||
|
||||
heap_free(prefixW);
|
||||
heap_free(localW);
|
||||
heap_free(uriW);
|
||||
heap_free(valueW);
|
||||
free(prefixW);
|
||||
free(localW);
|
||||
free(uriW);
|
||||
free(valueW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -880,7 +879,7 @@ static HRESULT write_string(IXmlWriter *writer, const char *str)
|
|||
|
||||
hr = IXmlWriter_WriteString(writer, strW);
|
||||
|
||||
heap_free(strW);
|
||||
free(strW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -1589,10 +1588,10 @@ static HRESULT write_attribute_string(IXmlWriter *writer, const char *prefix, co
|
|||
|
||||
hr = IXmlWriter_WriteAttributeString(writer, prefixW, localW, uriW, valueW);
|
||||
|
||||
heap_free(prefixW);
|
||||
heap_free(localW);
|
||||
heap_free(uriW);
|
||||
heap_free(valueW);
|
||||
free(prefixW);
|
||||
free(localW);
|
||||
free(uriW);
|
||||
free(valueW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -2116,10 +2115,10 @@ static HRESULT write_doctype(IXmlWriter *writer, const char *name, const char *p
|
|||
|
||||
hr = IXmlWriter_WriteDocType(writer, nameW, pubidW, sysidW, subsetW);
|
||||
|
||||
heap_free(nameW);
|
||||
heap_free(pubidW);
|
||||
heap_free(sysidW);
|
||||
heap_free(subsetW);
|
||||
free(nameW);
|
||||
free(pubidW);
|
||||
free(sysidW);
|
||||
free(subsetW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue