summaryrefslogtreecommitdiff
path: root/ace/OS_Dirent.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-02 00:32:46 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-12-02 00:32:46 +0000
commitcbce80ff9cf7a29320c6b5a26ad7756a5a10c0bc (patch)
tree41cd25c8c60b5808dcb6a40ccf1929ac2eb27747 /ace/OS_Dirent.cpp
parente77edafdf22ac67408782e3cb11eb31a601ccbb2 (diff)
downloadATCD-cbce80ff9cf7a29320c6b5a26ad7756a5a10c0bc.tar.gz
ChangeLogTag:Sat Dec 1 18:03:51 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Diffstat (limited to 'ace/OS_Dirent.cpp')
-rw-r--r--ace/OS_Dirent.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp
index 7f6954a44fc..8b1d82d6bab 100644
--- a/ace/OS_Dirent.cpp
+++ b/ace/OS_Dirent.cpp
@@ -57,6 +57,7 @@ ACE_OS_Dirent::opendir_emulation (const ACE_TCHAR *filename)
ACE_OS_String::strcat (dir->directory_name_, extra);
dir->current_handle_ = INVALID_HANDLE_VALUE;
dir->started_reading_ = 0;
+ dir->dirent_ = 0;
return dir;
#else /* ACE_WIN32 */
ACE_UNUSED_ARG (filename);
@@ -73,6 +74,7 @@ ACE_OS_Dirent::closedir_emulation (ACE_DIR *d)
d->current_handle_ = INVALID_HANDLE_VALUE;
d->started_reading_ = 0;
+ ACE_OS_Memory::free (d->dirent_);
#else /* ACE_WIN32 */
ACE_UNUSED_ARG (d);
#endif /* ACE_WIN32 */
@@ -82,6 +84,9 @@ dirent *
ACE_OS_Dirent::readdir_emulation (ACE_DIR *d)
{
#if defined (ACE_WIN32)
+ ACE_OS_Memory::free (d->dirent_);
+ d->dirent_ = 0;
+
if (!d->started_reading_)
{
d->current_handle_ = ACE_TEXT_FindFirstFile (d->directory_name_,