Mike McCormack : riched20: Make sure to use GlobalAlloc with
GlobalFree.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 24 04:55:31 CDT 2006
Module: wine
Branch: master
Commit: e971e0fb89e4c0db6149eaedb706a5ab6d4de7e9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e971e0fb89e4c0db6149eaedb706a5ab6d4de7e9
Author: Mike McCormack <mike at codeweavers.com>
Date: Tue Oct 24 14:24:48 2006 +0900
riched20: Make sure to use GlobalAlloc with GlobalFree.
---
dlls/riched20/clipboard.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c
index 72529a0..3bb8b7b 100644
--- a/dlls/riched20/clipboard.c
+++ b/dlls/riched20/clipboard.c
@@ -76,7 +76,7 @@ static ULONG WINAPI EnumFormatImpl_Relea
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
- HeapFree(GetProcessHeap(), 0, This->fmtetc);
+ GlobalFree(This->fmtetc);
HeapFree(GetProcessHeap(), 0, This);
}
@@ -157,7 +157,7 @@ static HRESULT EnumFormatImpl_Create(FOR
ret->ref = 1;
ret->cur = 0;
ret->fmtetc_cnt = fmtetc_cnt;
- ret->fmtetc = HeapAlloc(GetProcessHeap(), 0, fmtetc_cnt*sizeof(FORMATETC));
+ ret->fmtetc = GlobalAlloc(GMEM_ZEROINIT, fmtetc_cnt*sizeof(FORMATETC));
memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC));
*lplpformatetc = (LPENUMFORMATETC)ret;
return S_OK;
@@ -400,7 +400,7 @@ HRESULT ME_GetDataObject(ME_TextEditor *
obj->fmtetc_cnt = 1;
if(editor->mode & TM_RICHTEXT)
obj->fmtetc_cnt++;
- obj->fmtetc = HeapAlloc(GetProcessHeap(), 0, obj->fmtetc_cnt*sizeof(FORMATETC));
+ obj->fmtetc = GlobalAlloc(GMEM_ZEROINIT, obj->fmtetc_cnt*sizeof(FORMATETC));
InitFormatEtc(obj->fmtetc[0], CF_UNICODETEXT, TYMED_HGLOBAL);
if(editor->mode & TM_RICHTEXT) {
obj->rtf = get_rtf_text(editor, lpchrg);
More information about the wine-cvs
mailing list