Commit 01e8eaef authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

riched20: Fixed memory leaks.

parent dfb41b35
......@@ -1210,12 +1210,12 @@ void ME_DestroyEditor(ME_TextEditor *editor)
ME_DisplayItem *pFirst = editor->pBuffer->pFirst;
ME_DisplayItem *p = pFirst, *pNext = NULL;
int i;
ME_ClearTempStyle(editor);
ME_EmptyUndoStack(editor);
while(p) {
pNext = p->next;
ME_DestroyDisplayItem(p);
ME_DestroyDisplayItem(p);
p = pNext;
}
ME_ReleaseStyle(editor->pBuffer->pDefaultStyle);
......@@ -1228,6 +1228,9 @@ void ME_DestroyEditor(ME_TextEditor *editor)
if(editor->lpOleCallback)
IUnknown_Release(editor->lpOleCallback);
FREE_OBJ(editor->pBuffer);
FREE_OBJ(editor->pCursors);
FREE_OBJ(editor);
}
......
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