Nikolay Sivov : riched20: Use regular allocation helpers for text services objects.

Alexandre Julliard julliard at winehq.org
Thu Sep 30 16:04:43 CDT 2021


Module: wine
Branch: master
Commit: 2064c206c0b67edb8524f572166b974ba9cbd6fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2064c206c0b67edb8524f572166b974ba9cbd6fe

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Sep 30 16:10:27 2021 +0300

riched20: Use regular allocation helpers for text services objects.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/riched20/txthost.c | 4 ++--
 dlls/riched20/txtsrv.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c
index e18ec9490c0..af4d37d9fd2 100644
--- a/dlls/riched20/txthost.c
+++ b/dlls/riched20/txthost.c
@@ -93,7 +93,7 @@ struct host *host_create( HWND hwnd, CREATESTRUCTW *cs, BOOL emulate_10 )
 {
     struct host *texthost;
 
-    texthost = CoTaskMemAlloc(sizeof(*texthost));
+    texthost = heap_alloc(sizeof(*texthost));
     if (!texthost) return NULL;
 
     texthost->ITextHost_iface.lpVtbl = &textHostVtbl;
@@ -158,7 +158,7 @@ static ULONG WINAPI ITextHostImpl_Release( ITextHost2 *iface )
     {
         SetWindowLongPtrW( host->window, 0, 0 );
         ITextServices_Release( host->text_srv );
-        CoTaskMemFree( host );
+        heap_free( host );
     }
     return ref;
 }
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index 73b8d3ea7e9..fb7fc754bb5 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -81,7 +81,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface)
     {
         richole_release_children( services );
         ME_DestroyEditor( services->editor );
-        CoTaskMemFree( services );
+        heap_free( services );
     }
     return ref;
 }
@@ -580,7 +580,7 @@ HRESULT create_text_services( IUnknown *outer, ITextHost *text_host, IUnknown **
     TRACE( "%p %p --> %p\n", outer, text_host, unk );
     if (text_host == NULL) return E_POINTER;
 
-    services = CoTaskMemAlloc( sizeof(*services) );
+    services = heap_alloc( sizeof(*services) );
     if (services == NULL) return E_OUTOFMEMORY;
     services->ref = 1;
     services->IUnknown_inner.lpVtbl = &textservices_inner_vtbl;




More information about the wine-cvs mailing list