diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-05-25 13:40:49 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-05-25 13:40:49 +0000 |
commit | 14455225930f4c1a0b93383fdefe0bffed969f65 (patch) | |
tree | 81b8cb28f5f996d38119591ec6274c17fbe6917a /ace/Message_Block.cpp | |
parent | 53062e1077756956e1c807719ad6936c5e48a911 (diff) | |
download | ATCD-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.cpp | 13 |
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; } |