summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-21 00:58:44 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-21 00:58:44 +0000
commit6f109d19f25366073d4e5d73c68ed0c8654ec36a (patch)
treeb039b7c5e9790c965110deb4f23a7b2f9333bffc
parent2e79f5b140fb52b9853a9aeae73622a0e4bee325 (diff)
downloadATCD-6f109d19f25366073d4e5d73c68ed0c8654ec36a.tar.gz
Added a typecode release to TAO_Marshal_Any::decode() to plug a
memory leak.
-rw-r--r--TAO/tao/decode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index b71661ab6de..878f96f75c4 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -210,6 +210,10 @@ TAO_Marshal_Any::decode (CORBA::TypeCode_ptr,
any->cdr_ = ACE_Message_Block::duplicate (out.begin ());
any->value_ = 0;
+
+ if (any->type_)
+ CORBA::release (any->type_);
+
any->type_ = elem_tc._retn ();
any->any_owns_data_ = 1;