summaryrefslogtreecommitdiff
path: root/ACE/ace/Cleanup.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-01-20 06:26:02 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-01-20 06:26:02 +0000
commitf0bf02f1bfbedf9b97b07bd9be3d4b83da899201 (patch)
treed80e8931a963ee092093bf76681cd19395daf275 /ACE/ace/Cleanup.cpp
parenta4554faa53520455b851ad81acdddd56baffd79b (diff)
downloadATCD-f0bf02f1bfbedf9b97b07bd9be3d4b83da899201.tar.gz
Tue Jan 20 06:25:01 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/Cleanup.cpp')
-rw-r--r--ACE/ace/Cleanup.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ACE/ace/Cleanup.cpp b/ACE/ace/Cleanup.cpp
index 9be6235556c..665c4ba5674 100644
--- a/ACE/ace/Cleanup.cpp
+++ b/ACE/ace/Cleanup.cpp
@@ -11,6 +11,7 @@ ACE_RCSID (ace,
#endif /* ACE_HAS_INLINED_OSCALLS */
#include "ace/OS_Memory.h"
+#include "ace/OS_NS_string.h"
#include "ace/os_include/os_typeinfo.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -50,12 +51,14 @@ ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void *object,
: object_ (object),
cleanup_hook_ (cleanup_hook),
param_ (param),
- name_ (name)
+ name_ (name ? ACE_OS::strdup (name) : 0)
{
}
ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void)
{
+ if (this->name_)
+ ACE_OS::free ((void *) name_);
}
bool