From 5e196aadf2013db22f32328127d64f357fd28647 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 30 Oct 2012 07:59:48 +0000 Subject: [PATCH] 2012-10-30 08:59 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/contrib/xhb/filestat.c ! fixed resource leak in FILESTATS() function caused by wrong close WIN API function. Problem reported by Robb - thanks. --- harbour/ChangeLog | 5 +++++ harbour/contrib/xhb/filestat.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f847aa69d8..2eb9d735c5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-30 08:59 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/contrib/xhb/filestat.c + ! fixed resource leak in FILESTATS() function caused by wrong close + WIN API function. Problem reported by Robb - thanks. + 2012-10-25 00:08 UTC+0200 Viktor Szakats (harbour syenar.net) * website/mailing.html - deleted reference to 3rd mailing list diff --git a/harbour/contrib/xhb/filestat.c b/harbour/contrib/xhb/filestat.c index 1604bbdc54..f39cd0dca2 100644 --- a/harbour/contrib/xhb/filestat.c +++ b/harbour/contrib/xhb/filestat.c @@ -205,7 +205,7 @@ HB_FUNC( FILESTATS ) hFind = FindFirstFile( lpFileName, &ffind ); if( hFind != INVALID_HANDLE_VALUE ) { - CloseHandle( hFind ); + FindClose( hFind ); /* get file times and work them out */ llSize = ( HB_FOFFSET ) ffind.nFileSizeLow + ( ( HB_FOFFSET ) ffind.nFileSizeHigh << 32 );