From ab6d1e7a9fc33f69200ad45da8f67b6cb1a3ba4b Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 18 Dec 2009 03:08:30 +0000 Subject: [PATCH] 2009-12-18 04:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! fixed yet another one memory leak --- harbour/ChangeLog | 4 ++++ harbour/src/rtl/gtxwc/gtxwc.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8b5cf3bbcc..542fa1916e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-18 04:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtxwc/gtxwc.c + ! fixed yet another one memory leak + 2009-12-18 03:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! fixed memory leak caused by unreleased text property value diff --git a/harbour/src/rtl/gtxwc/gtxwc.c b/harbour/src/rtl/gtxwc/gtxwc.c index 4e16efd2cd..94ce550d81 100644 --- a/harbour/src/rtl/gtxwc/gtxwc.c +++ b/harbour/src/rtl/gtxwc/gtxwc.c @@ -2113,6 +2113,9 @@ static void hb_gt_xwc_WndProc( PXWND_DEF wnd, XEvent *evt ) #ifdef XWC_DEBUG printf( "UTF8String='%s'\r\n", text.value ); fflush(stdout); #endif + if( wnd->ClipboardData != NULL ) + hb_xfree( wnd->ClipboardData ); + wnd->ClipboardSize = text.nitems; wnd->ClipboardData = ( unsigned char * ) hb_cdpnDup( ( const char * ) text.value, &wnd->ClipboardSize,