diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-18 14:21:43 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-18 14:21:43 +0000 |
commit | 835329f3799bd8263c9466814eef81b9cfbf96da (patch) | |
tree | 094b95635966253b91947c3cc560184e25d7fec3 | |
parent | f66674fb65030d074692789172eca366f5d40d1b (diff) | |
download | ATCD-835329f3799bd8263c9466814eef81b9cfbf96da.tar.gz |
ChangeLogTag: Thu Nov 18 06:00:26 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r-- | TAO/ChangeLog | 11 | ||||
-rw-r--r-- | TAO/tao/IORManipulation/IORManipulation.cpp | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index c5780a9e70a..84d61475801 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,14 @@ +Thu Nov 18 06:00:26 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * tao/IORManipulation/IORManipulation.cpp: + + Moved explicit release of the TAO_Stub_Auto_Ptr to transfer + "ownership" of the contained TAO_Stub to the new Object_var as + soon as it is created. This avoids a crash in the case where + the Invalid_IOR exception was thrown. At that point both + objects assume they own the TAO_Stub, which causes it to be + deleted twice when the stack is unwound. + Thu Nov 18 11:47:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl> * docs/releasenotes/ec.html: diff --git a/TAO/tao/IORManipulation/IORManipulation.cpp b/TAO/tao/IORManipulation/IORManipulation.cpp index 814806ebba5..7a9e1cf18f3 100644 --- a/TAO/tao/IORManipulation/IORManipulation.cpp +++ b/TAO/tao/IORManipulation/IORManipulation.cpp @@ -213,7 +213,9 @@ TAO_IOR_Manipulation_impl::remove_profiles ( CORBA::Object_var new_obj = temp_obj; - ACE_CHECK_RETURN (CORBA::Object::_nil ()); + // Exception safety is no longer an issue by this point so release + // the TAO_Stub from the TAO_Stub_Auto_Ptr. + stub = safe_stub.release (); // Clean up in case of errors. if (CORBA::is_nil (new_obj.in ())) @@ -222,10 +224,6 @@ TAO_IOR_Manipulation_impl::remove_profiles ( CORBA::Object::_nil ()); } - // Exception safety is no longer an issue by this point so release - // the TAO_Stub from the TAO_Stub_Auto_Ptr. - stub = safe_stub.release (); - return new_obj._retn (); } |