Francois Gouget : wsdapi/tests: Avoid calls to malloc() and free().
Alexandre Julliard
julliard at winehq.org
Thu Aug 23 16:37:04 CDT 2018
Module: wine
Branch: master
Commit: ad5457335117880274dc724c440c0b26ad57d14b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ad5457335117880274dc724c440c0b26ad57d14b
Author: Francois Gouget <fgouget at free.fr>
Date: Thu Aug 23 16:43:41 2018 +0200
wsdapi/tests: Avoid calls to malloc() and free().
Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wsdapi/tests/discovery.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c
index 43a4b2c..f33f469 100644
--- a/dlls/wsdapi/tests/discovery.c
+++ b/dlls/wsdapi/tests/discovery.c
@@ -1029,20 +1029,20 @@ static void Publish_tests(void)
another_name.LocalName = (WCHAR *) name_cider;
another_name.Space = &ns2;
- types_list.Next = malloc(sizeof(WSD_NAME_LIST));
+ types_list.Next = heap_alloc(sizeof(WSD_NAME_LIST));
types_list.Element = &another_name;
types_list.Next->Next = NULL;
types_list.Next->Element = &header_any_name;
/* Create scopes and xaddrs lists */
- scopes_list.Next = malloc(sizeof(WSD_URI_LIST));
+ scopes_list.Next = heap_alloc(sizeof(WSD_URI_LIST));
scopes_list.Element = uri;
scopes_list.Next->Next = NULL;
scopes_list.Next->Element = uri_more_tests;
- xaddrs_list.Next = malloc(sizeof(WSD_URI_LIST));
+ xaddrs_list.Next = heap_alloc(sizeof(WSD_URI_LIST));
xaddrs_list.Element = uri_more_tests;
xaddrs_list.Next->Next = NULL;
@@ -1056,9 +1056,9 @@ static void Publish_tests(void)
WSDFreeLinkedMemory(body_any_element);
WSDFreeLinkedMemory(endpoint_any_element);
WSDFreeLinkedMemory(ref_param_any_element);
- free(types_list.Next);
- free(scopes_list.Next);
- free(xaddrs_list.Next);
+ heap_free(types_list.Next);
+ heap_free(scopes_list.Next);
+ heap_free(xaddrs_list.Next);
ok(rc == S_OK, "Publish failed: %08x\n", rc);
More information about the wine-cvs
mailing list