riched20: Fix a leak.

This commit is contained in:
Jactry Zeng 2014-10-28 20:10:03 +08:00 committed by Alexandre Julliard
parent 84d7239640
commit ffb706ceb0
3 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);