summaryrefslogtreecommitdiff
path: root/ace/Message_Block.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-25 13:40:49 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-25 13:40:49 +0000
commit14455225930f4c1a0b93383fdefe0bffed969f65 (patch)
tree81b8cb28f5f996d38119591ec6274c17fbe6917a /ace/Message_Block.cpp
parent53062e1077756956e1c807719ad6936c5e48a911 (diff)
downloadATCD-14455225930f4c1a0b93383fdefe0bffed969f65.tar.gz
ChangeLogTag: Fri May 25 08:37:37 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'ace/Message_Block.cpp')
-rw-r--r--ace/Message_Block.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
index 1eb448ab45a..001b094f9ac 100644
--- a/ace/Message_Block.cpp
+++ b/ace/Message_Block.cpp
@@ -909,14 +909,15 @@ ACE_Data_Block::clone (ACE_Message_Block::Message_Flags mask) const
{
ACE_TRACE ("ACE_Data_Block::clone");
- ACE_Data_Block *nb;
-
- ACE_NEW_RETURN (nb, this->clone_nocopy (mask), 0);
+ ACE_Data_Block *nb = this->clone_nocopy (mask);
// Copy all of the payload memory into the new object.
- ACE_OS::memcpy (nb->base_,
- this->base_,
- this->max_size_);
+ if (nb != 0)
+ {
+ ACE_OS::memcpy (nb->base_,
+ this->base_,
+ this->max_size_);
+ }
return nb;
}