From cb6315072ff23740bdc5fc2f95dd960601df5664 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Tue, 3 Feb 2009 15:54:31 +0000 Subject: [PATCH] Xming: Fix a memory leak in clipboard integration code Free the memory allocated for ReturnData in FlushXEvents(). Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY --- hw/xwin/winclipboardxevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index 28a8cd238..95e86b1dc 100644 --- a/hw/xwin/winclipboardxevents.c +++ b/hw/xwin/winclipboardxevents.c @@ -713,6 +713,8 @@ winClipboardFlushXEvents (HWND hwnd, hGlobal = GlobalAlloc (GMEM_MOVEABLE, iConvertDataLen); } + free (pszReturnData); + /* Check that global memory was allocated */ if (!hGlobal) {