From 0c1cb5388cad977ca409597ff32ef9d4a274bbf2 Mon Sep 17 00:00:00 2001 From: bala Date: Wed, 1 Mar 2000 18:54:41 +0000 Subject: ChangeLogTag: Wed Mar 1 12:47:41 2000 Balachandran Natarajan --- TAO/tao/POA.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'TAO/tao/POA.cpp') diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp index 1cd9a8a920e..387326a8c97 100644 --- a/TAO/tao/POA.cpp +++ b/TAO/tao/POA.cpp @@ -1249,7 +1249,10 @@ TAO_POA::create_reference_i (const char *intf, { // Otherwise, it is the NON_RETAIN policy. Therefore, any ol' // object id will do (even an empty one). - system_id = new PortableServer::ObjectId; + ACE_NEW_THROW_EX (system_id, + PortableServer::ObjectId, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA::Object::_nil ()); } // Create object key. @@ -1309,14 +1312,17 @@ TAO_POA::create_reference_with_id_i (const PortableServer::ObjectId &user_id, system_id.out ()) != 0) { ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), - CORBA::Object::_nil ()); + CORBA::Object::_nil ()); } } else { // Otherwise, it is the NON_RETAIN policy. Therefore, user id // is the same as system id. - system_id = new PortableServer::ObjectId (user_id); + ACE_NEW_THROW_EX (system_id, + PortableServer::ObjectId (user_id), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (CORBA::Object::_nil ()); } // Create object key. -- cgit v1.2.1