summaryrefslogtreecommitdiff
path: root/ACE/ace/Dirent_Selector.cpp
diff options
context:
space:
mode:
authorAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
committerAdam Mitz <mitza@ociweb.com>2015-11-06 17:07:11 -0600
commitac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b (patch)
tree0e70d1f51c39e688a05a6cdc2af58408222e4a0d /ACE/ace/Dirent_Selector.cpp
parent5272b5b81f92c298cb998b5bb0b0dbca3e7f29fe (diff)
downloadATCD-ac5e1702c9f9bee9f1f7bfce8c1a6f3847ea6b4b.tar.gz
Merged branch ace-face-safety (FACE Safety Profile import from OCITAO).
Diffstat (limited to 'ACE/ace/Dirent_Selector.cpp')
-rw-r--r--ACE/ace/Dirent_Selector.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ACE/ace/Dirent_Selector.cpp b/ACE/ace/Dirent_Selector.cpp
index 3e71059977c..f16d1da685e 100644
--- a/ACE/ace/Dirent_Selector.cpp
+++ b/ACE/ace/Dirent_Selector.cpp
@@ -7,6 +7,10 @@
#include "ace/OS_NS_dirent.h"
#include "ace/OS_NS_stdlib.h"
+#if defined (ACE_HAS_ALLOC_HOOKS)
+# include "ace/Malloc_Base.h"
+#endif /* ACE_HAS_ALLOC_HOOKS */
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Construction/Destruction
@@ -40,12 +44,24 @@ ACE_Dirent_Selector::close (void)
#if defined (ACE_LACKS_STRUCT_DIR)
// Only the lacking-struct-dir emulation allocates this. Native
// scandir includes d_name in the dirent struct itself.
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free (this->namelist_[n_]->d_name);
+#else
ACE_OS::free (this->namelist_[n_]->d_name);
+#endif /* ACE_HAS_ALLOC_HOOKS */
#endif
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free (this->namelist_[n_]);
+#else
ACE_OS::free (this->namelist_[n_]);
+#endif /* ACE_HAS_ALLOC_HOOKS */
}
+#if defined (ACE_HAS_ALLOC_HOOKS)
+ ACE_Allocator::instance()->free (this->namelist_);
+#else
ACE_OS::free (this->namelist_);
+#endif /* ACE_HAS_ALLOC_HOOKS */
this->namelist_ = 0;
return 0;
}