Jactry Zeng : riched20: Fix a leak.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 30 09:23:14 CDT 2014
Module: wine
Branch: master
Commit: ffb706ceb0ce59088f134012c185f6876436306b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ffb706ceb0ce59088f134012c185f6876436306b
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Tue Oct 28 20:10:03 2014 +0800
riched20: Fix a leak.
---
dlls/riched20/editor.c | 2 +-
dlls/riched20/editor.h | 1 +
dlls/riched20/txtsrv.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 3c0d970..a277510 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2863,7 +2863,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
return ed;
}
-static void ME_DestroyEditor(ME_TextEditor *editor)
+void ME_DestroyEditor(ME_TextEditor *editor)
{
ME_DisplayItem *pFirst = editor->pBuffer->pFirst;
ME_DisplayItem *p = pFirst, *pNext = NULL;
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index edbac8e..3987907 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -248,6 +248,7 @@ void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN;
/* editor.c */
ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN;
+void ME_DestroyEditor(ME_TextEditor *editor) DECLSPEC_HIDDEN;
LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
LPARAM lParam, BOOL unicode, HRESULT* phresult) DECLSPEC_HIDDEN;
void ME_SendOldNotify(ME_TextEditor *editor, int nCode) DECLSPEC_HIDDEN;
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index 636efff..0ca1e1b 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -108,7 +108,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface)
if (!ref)
{
- ITextHost_Release(This->pMyHost);
+ ME_DestroyEditor(This->editor);
This->csTxtSrv.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csTxtSrv);
CoTaskMemFree(This);
More information about the wine-cvs
mailing list