Huw Davies : riched20: Fix a memory leak.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:12 CST 2009


Module: wine
Branch: master
Commit: d88c47fccb5b40cd5e5e50fb0adf752d272cb5a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d88c47fccb5b40cd5e5e50fb0adf752d272cb5a2

Author: Huw Davies <huw at codeweavers.com>
Date:   Sun Dec 13 14:58:43 2009 +0000

riched20: Fix a memory leak.

Found by Valgrind.

---

 dlls/riched20/editor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 4bc901e..6790a6a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3283,6 +3283,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
       wszText = lParam ? ME_ToUnicode(bUnicode, (void *)lParam) : NULL;
       len = wszText ? lstrlenW(wszText) : 0;
       ME_InsertTextFromCursor(editor, 0, wszText, len, style);
+      ME_EndToUnicode(bUnicode, wszText);
     }
 
     if (bSelection) {




More information about the wine-cvs mailing list