Commit ffb706ce authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

riched20: Fix a leak.

parent 84d72396
...@@ -2863,7 +2863,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ...@@ -2863,7 +2863,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
return ed; return ed;
} }
static void ME_DestroyEditor(ME_TextEditor *editor) void ME_DestroyEditor(ME_TextEditor *editor)
{ {
ME_DisplayItem *pFirst = editor->pBuffer->pFirst; ME_DisplayItem *pFirst = editor->pBuffer->pFirst;
ME_DisplayItem *p = pFirst, *pNext = NULL; ME_DisplayItem *p = pFirst, *pNext = NULL;
......
...@@ -248,6 +248,7 @@ void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN; ...@@ -248,6 +248,7 @@ void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN;
/* editor.c */ /* editor.c */
ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN; 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, LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
LPARAM lParam, BOOL unicode, HRESULT* phresult) DECLSPEC_HIDDEN; LPARAM lParam, BOOL unicode, HRESULT* phresult) DECLSPEC_HIDDEN;
void ME_SendOldNotify(ME_TextEditor *editor, int nCode) DECLSPEC_HIDDEN; void ME_SendOldNotify(ME_TextEditor *editor, int nCode) DECLSPEC_HIDDEN;
......
...@@ -108,7 +108,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface) ...@@ -108,7 +108,7 @@ static ULONG WINAPI ITextServicesImpl_Release(IUnknown *iface)
if (!ref) if (!ref)
{ {
ITextHost_Release(This->pMyHost); ME_DestroyEditor(This->editor);
This->csTxtSrv.DebugInfo->Spare[0] = 0; This->csTxtSrv.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->csTxtSrv); DeleteCriticalSection(&This->csTxtSrv);
CoTaskMemFree(This); CoTaskMemFree(This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment