diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 13 | ||||
-rw-r--r-- | TAO/tao/ImR_Client/ImR_Client.cpp | 4 | ||||
-rw-r--r-- | TAO/utils/catior/catior.cpp | 669 | ||||
-rw-r--r-- | TAO/utils/nslist/nsadd.cpp | 14 | ||||
-rw-r--r-- | TAO/utils/nslist/nsdel.cpp | 11 | ||||
-rw-r--r-- | TAO/utils/nslist/nslist.cpp | 2 |
6 files changed, 360 insertions, 353 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 6f42bbcb21b..72c4520bb4c 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,7 +1,18 @@ +Tue May 10 18:15:28 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/ImR_Client/ImR_Client.cpp: + changed variable name to not match method argument + + * utils/catior/catior.cpp: + * utils/nslist/nsadd.cpp: + * utils/nslist/nsdel.cpp: + * utils/nslist/nslist.cpp: + Fixed coverity errors, not leak exceptions + Tue May 10 06:15:43 UTC 2011 Marcel Smit <msmit@remedy.nl> * tao/IORManipulation/IORManip_IIOP_Filter.cpp: - Fixed compile error. + Fixed compile error. Mon May 9 19:10:54 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> diff --git a/TAO/tao/ImR_Client/ImR_Client.cpp b/TAO/tao/ImR_Client/ImR_Client.cpp index 99c7f054849..f0cd9e424de 100644 --- a/TAO/tao/ImR_Client/ImR_Client.cpp +++ b/TAO/tao/ImR_Client/ImR_Client.cpp @@ -202,9 +202,9 @@ namespace TAO if (this->server_object_) { - PortableServer::POA_var poa = this->server_object_->_default_POA (); + PortableServer::POA_var default_poa = this->server_object_->_default_POA (); - TAO_Root_POA *root_poa = dynamic_cast <TAO_Root_POA*> (poa.in ()); + TAO_Root_POA *root_poa = dynamic_cast <TAO_Root_POA*> (default_poa.in ()); if (!root_poa) { diff --git a/TAO/utils/catior/catior.cpp b/TAO/utils/catior/catior.cpp index bba2834efe6..8621cf2bd5b 100644 --- a/TAO/utils/catior/catior.cpp +++ b/TAO/utils/catior/catior.cpp @@ -27,405 +27,414 @@ int ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) { - Catior_i catior_impl; - CORBA::ORB_var orb_var = CORBA::ORB_init (argcw, argvw, "TAO"); - CORBA::Boolean b = 0; - CORBA::Boolean have_argument = 0; - int opt; + CORBA::ORB_var orb_var; + try + { + Catior_i catior_impl; + orb_var = CORBA::ORB_init (argcw, argvw); + CORBA::Boolean b = false; + CORBA::Boolean have_argument = false; + int opt; - ACE_Get_Opt get_opt (argcw, argvw, ACE_TEXT ("f:n:x")); + ACE_Get_Opt get_opt (argcw, argvw, ACE_TEXT ("f:n:x")); - while ((opt = get_opt ()) != EOF) - { - // some arguments have been supplied - have_argument = 1; - switch (opt) + while ((opt = get_opt ()) != EOF) { - case 'n': - { - // Read the CosName from the NamingService convert the - // object_ptr to a CORBA::String_var via the call to - // object_to_string. - ACE_DEBUG ((LM_DEBUG, - "opening a connection to the NamingService\n" - "resolving the CosName %s\n", - get_opt.opt_arg ())); - - CORBA::Object_var server_object; - - try + // some arguments have been supplied + have_argument = 1; + switch (opt) + { + case 'n': { - // Find the Naming Service. - CORBA::Object_var naming_context_object = - orb_var->resolve_initial_references ("NameService"); - CosNaming::NamingContextExt_var naming_context = - CosNaming::NamingContextExt::_narrow (naming_context_object.in ()); - - if (CORBA::is_nil (naming_context.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "NameService cannot be resolved\n"), - -1); - } - - CosNaming::Name *name = - naming_context->to_name (ACE_TEXT_ALWAYS_CHAR (get_opt.opt_arg ())); + // Read the CosName from the NamingService convert the + // object_ptr to a CORBA::String_var via the call to + // object_to_string. + ACE_DEBUG ((LM_DEBUG, + "opening a connection to the NamingService\n" + "resolving the CosName %s\n", + get_opt.opt_arg ())); + + CORBA::Object_var server_object; try { - server_object = naming_context->resolve (*name); - if (CORBA::is_nil (server_object.in ())) + // Find the Naming Service. + CORBA::Object_var naming_context_object = + orb_var->resolve_initial_references ("NameService"); + CosNaming::NamingContextExt_var naming_context = + CosNaming::NamingContextExt::_narrow (naming_context_object.in ()); + + if (CORBA::is_nil (naming_context.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "NameService cannot be resolved\n"), + -1); + } + + CosNaming::Name *name = + naming_context->to_name (ACE_TEXT_ALWAYS_CHAR (get_opt.opt_arg ())); + + try + { + server_object = naming_context->resolve (*name); + if (CORBA::is_nil (server_object.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "name is not resolved to a valid object\n"), + -1); + } + } + catch (const CosNaming::NamingContext::NotFound& nf) { + const ACE_TCHAR *reason; + + switch (nf.why) + { + case CosNaming::NamingContext::missing_node: + reason = ACE_TEXT ("missing node"); + break; + case CosNaming::NamingContext::not_context: + reason = ACE_TEXT ("not context"); + break; + case CosNaming::NamingContext::not_object: + reason = ACE_TEXT ("not object"); + break; + default: + reason = ACE_TEXT ("not known"); + break; + } ACE_ERROR_RETURN ((LM_ERROR, - "name is not resolved to a valid object\n"), - -1); + "%s cannot be resolved, exception reason = %s\n", + get_opt.opt_arg (), + reason), + -1); } - } - catch (const CosNaming::NamingContext::NotFound& nf) - { - const ACE_TCHAR *reason; - - switch (nf.why) + catch (const CosNaming::NamingContext::InvalidName&) { - case CosNaming::NamingContext::missing_node: - reason = ACE_TEXT ("missing node"); - break; - case CosNaming::NamingContext::not_context: - reason = ACE_TEXT ("not context"); - break; - case CosNaming::NamingContext::not_object: - reason = ACE_TEXT ("not object"); - break; - default: - reason = ACE_TEXT ("not known"); - break; + ACE_ERROR_RETURN ((LM_ERROR, + "%s cannot be resolved, exception reason = " + "Invalid Name" + "\n", + get_opt.opt_arg ()), + -1); } - ACE_ERROR_RETURN ((LM_ERROR, - "%s cannot be resolved, exception reason = %s\n", - get_opt.opt_arg (), - reason), - -1); - } - catch (const CosNaming::NamingContext::InvalidName&) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s cannot be resolved, exception reason = " - "Invalid Name" - "\n", - get_opt.opt_arg ()), - -1); - } - catch (const CosNaming::NamingContext::CannotProceed&) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s cannot be resolved, exception reason = " - "Cannot Proceed" - "\n", - get_opt.opt_arg ()), - -1); + catch (const CosNaming::NamingContext::CannotProceed&) + { + ACE_ERROR_RETURN ((LM_ERROR, + "%s cannot be resolved, exception reason = " + "Cannot Proceed" + "\n", + get_opt.opt_arg ()), + -1); + } + catch (const CORBA::Exception&) + { + ACE_ERROR_RETURN ((LM_ERROR, + "%s cannot be resolved, exception reason = " + "Unexpected Exception" + "\n", + argvw[0]), + -1); + } + + ACE_CString aString; + + aString = orb_var->object_to_string (server_object.in ()); + + ACE_DEBUG ((LM_DEBUG, + "\nhere is the IOR\n%C\n\n", + aString.rep ())); + + ACE_CString str; + b = catior_impl.decode(aString, str); + ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); } catch (const CORBA::Exception&) { ACE_ERROR_RETURN ((LM_ERROR, - "%s cannot be resolved, exception reason = " - "Unexpected Exception" - "\n", - argvw[0]), + "%s cannot be resolved, exception reason = " + "Unexpected Exception" + "\n", + argvw[0]), -1); } - ACE_CString aString; - - aString = orb_var->object_to_string (server_object.in ()); - - ACE_DEBUG ((LM_DEBUG, - "\nhere is the IOR\n%C\n\n", - aString.rep ())); - - ACE_CString str; - b = catior_impl.decode(aString, str); - ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); + if (b == 1) + ACE_DEBUG ((LM_DEBUG, + "catior returned true\n")); + else + ACE_DEBUG ((LM_DEBUG, + "catior returned false\n")); + break; } - catch (const CORBA::Exception&) + case 'f': { - ACE_ERROR_RETURN ((LM_ERROR, - "%s cannot be resolved, exception reason = " - "Unexpected Exception" - "\n", - argvw[0]), - -1); - } + int have_some_input = 0; + int decode_pass_count = 0; - if (b == 1) - ACE_DEBUG ((LM_DEBUG, - "catior returned true\n")); - else - ACE_DEBUG ((LM_DEBUG, - "catior returned false\n")); - break; - } - case 'f': - { - int have_some_input = 0; - int decode_pass_count = 0; - - // Read the file into a CORBA::String_var. - ACE_DEBUG ((LM_DEBUG, - "reading the file %s\n", - get_opt.opt_arg ())); + // Read the file into a CORBA::String_var. + ACE_DEBUG ((LM_DEBUG, + "reading the file %s\n", + get_opt.opt_arg ())); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - ifstream ifstr (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ())); + ifstream ifstr (ACE_TEXT_ALWAYS_CHAR(get_opt.opt_arg ())); - if (!ifstr.good ()) - { - ifstr.close (); - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-f %s " - "\n" - "Invalid IOR file nominated" - "\n", - argvw[0], - get_opt.opt_arg ()), - -1); - } - - while (!ifstr.eof()) - { - ACE_CString aString; - - have_some_input = 0; - - while (!ifstr.eof ()) + if (!ifstr.good ()) { - char ch = 0; - ifstr.get (ch); - if (ifstr.eof () || ch == '\n' || ch == '\r') - break; - aString += ch; - ++have_some_input; + ifstr.close (); + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-f %s " + "\n" + "Invalid IOR file nominated" + "\n", + argvw[0], + get_opt.opt_arg ()), + -1); } -#else - FILE* ifstr = ACE_OS::fopen (get_opt.opt_arg (), ACE_TEXT ("r")); - if (!ifstr || ferror (ifstr)) - { - if (ifstr) + while (!ifstr.eof()) { - ACE_OS::fclose (ifstr); - } - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-f %s " - "\n" - "Invalid IOR file nominated" - "\n", - argvw[0], - get_opt.opt_arg ()), - -1); - } + ACE_CString aString; - while (!feof (ifstr)) - { - char ch; - ACE_CString aString; + have_some_input = 0; - have_some_input = 0; + while (!ifstr.eof ()) + { + char ch = 0; + ifstr.get (ch); + if (ifstr.eof () || ch == '\n' || ch == '\r') + break; + aString += ch; + ++have_some_input; + } +#else + FILE* ifstr = ACE_OS::fopen (get_opt.opt_arg (), ACE_TEXT ("r")); - while (!feof (ifstr)) + if (!ifstr || ferror (ifstr)) { - ch = ACE_OS::fgetc (ifstr); - if (ch == EOF || ch == '\n' || ch == '\r') - break; - aString += ch; - ++have_some_input; + if (ifstr) + { + ACE_OS::fclose (ifstr); + } + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-f %s " + "\n" + "Invalid IOR file nominated" + "\n", + argvw[0], + get_opt.opt_arg ()), + -1); } -#endif /* !defined (ACE_LACKS_IOSTREAM_TOTALLY) */ - if (have_some_input == 0 || !aString.length()) + + while (!feof (ifstr)) { - if (!decode_pass_count) + char ch; + ACE_CString aString; + + have_some_input = 0; + + while (!feof (ifstr)) { - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-f %s " - "\n" - "Empty IOR file nominated" - "\n", - argvw[0], - get_opt.opt_arg ()), - -1); + ch = ACE_OS::fgetc (ifstr); + if (ch == EOF || ch == '\n' || ch == '\r') + break; + aString += ch; + ++have_some_input; } - else +#endif /* !defined (ACE_LACKS_IOSTREAM_TOTALLY) */ + if (have_some_input == 0 || !aString.length()) { - ACE_DEBUG ((LM_DEBUG, - "catior returned true\n")); - return 0; // All done now + if (!decode_pass_count) + { + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-f %s " + "\n" + "Empty IOR file nominated" + "\n", + argvw[0], + get_opt.opt_arg ()), + -1); + } + else + { + ACE_DEBUG ((LM_DEBUG, + "catior returned true\n")); + return 0; // All done now + } } - } - ++decode_pass_count; + ++decode_pass_count; - ACE_DEBUG ((LM_DEBUG, - "\nhere is the IOR\n%C\n\n", - aString.rep ())); + ACE_DEBUG ((LM_DEBUG, + "\nhere is the IOR\n%C\n\n", + aString.rep ())); - ACE_CString str; - b = catior_impl.decode(aString, str); - ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); - } - if (b == 1) - ACE_DEBUG ((LM_DEBUG, - "catior returned true\n")); - else - ACE_DEBUG ((LM_DEBUG, - "catior returned false\n")); + ACE_CString str; + b = catior_impl.decode(aString, str); + ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); + } + if (b == 1) + ACE_DEBUG ((LM_DEBUG, + "catior returned true\n")); + else + ACE_DEBUG ((LM_DEBUG, + "catior returned false\n")); #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - ifstr.close (); + ifstr.close (); #else - ACE_OS::fclose (ifstr); + ACE_OS::fclose (ifstr); #endif /* !defined (ACE_LACKS_IOSTREAM_TOTALLY) */ - } - break; - case 'x': - { - int have_some_input = 0; - int decode_pass_count = 0; - - // Read the input into a CORBA::String_var. - ACE_DEBUG ((LM_DEBUG, - "reading from stdin\n")); - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - if (!cin.good ()) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-x" - "\n" - "Invalid input stream" - "\n", - argvw[0]), - -1); } - - while (!cin.eof()) + break; + case 'x': { - ACE_CString aString; + int have_some_input = 0; + int decode_pass_count = 0; - have_some_input = 0; + // Read the input into a CORBA::String_var. + ACE_DEBUG ((LM_DEBUG, + "reading from stdin\n")); - while (!cin.eof ()) + #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) + if (!cin.good ()) { - char ch = 0; - cin.get (ch); - if (cin.eof () || ch == '\n' || ch == '\r') - break; - aString += ch; - ++have_some_input; + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-x" + "\n" + "Invalid input stream" + "\n", + argvw[0]), + -1); } -#else - FILE* ifstr = stdin; - if (!ifstr || ferror (ifstr)) - { - if (ifstr) + while (!cin.eof()) { - ACE_OS::fclose (ifstr); - } - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-x" - "\n" - "Invalid input stream" - "\n", - argvw[0]), - -1); - } + ACE_CString aString; - while (!feof (ifstr)) - { - char ch; - ACE_CString aString; + have_some_input = 0; - have_some_input = 0; + while (!cin.eof ()) + { + char ch = 0; + cin.get (ch); + if (cin.eof () || ch == '\n' || ch == '\r') + break; + aString += ch; + ++have_some_input; + } +#else + FILE* ifstr = stdin; - while (!feof (ifstr)) + if (!ifstr || ferror (ifstr)) { - ch = ACE_OS::fgetc (ifstr); - if (ch == EOF || ch == '\n' || ch == '\r') - break; - aString += ch; - ++have_some_input; + if (ifstr) + { + ACE_OS::fclose (ifstr); + } + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-x" + "\n" + "Invalid input stream" + "\n", + argvw[0]), + -1); } -#endif /* !defined (ACE_LACKS_IOSTREAM_TOTALLY) */ - if (have_some_input == 0) + while (!feof (ifstr)) { - if (!decode_pass_count) + char ch; + ACE_CString aString; + + have_some_input = 0; + + while (!feof (ifstr)) { - ACE_ERROR_RETURN ((LM_ERROR, - "%s " - "-x" - "\n" - "Empty input stream" - "\n", - argvw[0]), - -1); + ch = ACE_OS::fgetc (ifstr); + if (ch == EOF || ch == '\n' || ch == '\r') + break; + aString += ch; + ++have_some_input; } - else +#endif /* !defined (ACE_LACKS_IOSTREAM_TOTALLY) */ + + if (have_some_input == 0) { - return 0; // All done now + if (!decode_pass_count) + { + ACE_ERROR_RETURN ((LM_ERROR, + "%s " + "-x" + "\n" + "Empty input stream" + "\n", + argvw[0]), + -1); + } + else + { + return 0; // All done now + } } - } - ++decode_pass_count; + ++decode_pass_count; - ACE_DEBUG ((LM_DEBUG, - "\nhere is the IOR\n%C\n\n", - aString.rep ())); + ACE_DEBUG ((LM_DEBUG, + "\nhere is the IOR\n%C\n\n", + aString.rep ())); - ACE_CString str; - b = catior_impl.decode(aString, str); - ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); + ACE_CString str; + b = catior_impl.decode(aString, str); + ACE_DEBUG ((LM_DEBUG, "%s", str.c_str())); + } + if (b == 1) + ACE_DEBUG ((LM_DEBUG, + "catior returned true\n")); + else + ACE_DEBUG ((LM_DEBUG, + "catior returned false\n")); } - if (b == 1) - ACE_DEBUG ((LM_DEBUG, - "catior returned true\n")); - else - ACE_DEBUG ((LM_DEBUG, - "catior returned false\n")); - } - break; - case '?': - case 'h': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-f filename " - "-n CosName " - "\n" - "Reads an IOR " - "and dumps the contents to stdout " - "\n", - argvw[0]), - 1); + break; + case '?': + case 'h': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "Usage: %s " + "-f filename " + "-n CosName " + "\n" + "Reads an IOR " + "and dumps the contents to stdout " + "\n", + argvw[0]), + 1); + } } - } - // check that some relevant arguments have been supplied - if (have_argument == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Usage: %s " - "-f filename " - "-n CosName " - "\n" - "Reads an IOR " - "and dumps the contents to stdout " - "\n", - argvw[0]), - 1); + // check that some relevant arguments have been supplied + if (have_argument == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Usage: %s " + "-f filename " + "-n CosName " + "\n" + "Reads an IOR " + "and dumps the contents to stdout " + "\n", + argvw[0]), + 1); + } + catch (const CORBA::Exception& ex) + { + ACE_DEBUG ((LM_DEBUG, "\nError:\n")); + ex._tao_print_exception ("Exception in nsadd"); + orb_var->destroy (); + return 1; + } return 0; } - - diff --git a/TAO/utils/nslist/nsadd.cpp b/TAO/utils/nslist/nsadd.cpp index 31a65458e84..beaab182720 100644 --- a/TAO/utils/nslist/nsadd.cpp +++ b/TAO/utils/nslist/nsadd.cpp @@ -17,14 +17,12 @@ #include "orbsvcs/CosNamingC.h" #include "ace/Log_Msg.h" #include "ace/OS_NS_string.h" -#include "ace/Argv_Type_Converter.h" -CORBA::ORB_var orb; int showIOR = 0; int showNSonly = 0; int -ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { CosNaming::Name the_name (0); CORBA::ORB_var orb; @@ -33,9 +31,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) try { // Contact the orb - ACE_Argv_Type_Converter argcon (argcw, argvw); - orb = CORBA::ORB_init (argcon.get_argc (), argcon.get_ASCII_argv (), - ""); + orb = CORBA::ORB_init (argc, argv); // Scan through the command line options bool @@ -43,10 +39,6 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) quiet = false, rebind = false, context = false; - int - argc = argcon.get_argc (); - ACE_TCHAR - **argv = argcon.get_TCHAR_argv (); const ACE_TCHAR *const pname = argv[0]; const ACE_TCHAR *nameService = 0; @@ -374,6 +366,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) root_nc->bind (the_name, obj.in ()); } } + orb->destroy (); } catch (const CosNaming::NamingContext::NotFound& nf) { @@ -424,7 +417,6 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) return 1; } - orb->destroy (); return 0; } diff --git a/TAO/utils/nslist/nsdel.cpp b/TAO/utils/nslist/nsdel.cpp index d5d66818015..0b426a93c8d 100644 --- a/TAO/utils/nslist/nsdel.cpp +++ b/TAO/utils/nslist/nsdel.cpp @@ -60,7 +60,7 @@ namespace } // end of local unnamed namespace int -ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { CosNaming::Name the_name (0); CORBA::ORB_var orb; @@ -68,18 +68,13 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) try { // Contact the orb - ACE_Argv_Type_Converter argcon (argcw, argvw); - orb = CORBA::ORB_init (argcon.get_argc (), argcon.get_ASCII_argv ()); + orb = CORBA::ORB_init (argc, argv); // Scan through the command line options bool failed = false, quiet = false, destroy = false; - int - argc = argcon.get_argc (); - ACE_TCHAR - **argv = argcon.get_TCHAR_argv (); const ACE_TCHAR *const pname = argv[0]; const ACE_TCHAR *nameService = 0; ACE_TCHAR kindsep = ACE_TEXT('.'); @@ -336,6 +331,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) } } } + orb->destroy (); } catch (const CosNaming::NamingContext::NotFound& nf) { @@ -387,6 +383,5 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[]) return 1; } - orb->destroy (); return 0; } diff --git a/TAO/utils/nslist/nslist.cpp b/TAO/utils/nslist/nslist.cpp index 09c336d5810..a37959d410a 100644 --- a/TAO/utils/nslist/nslist.cpp +++ b/TAO/utils/nslist/nslist.cpp @@ -718,6 +718,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ((showCtxIOR)? str.in () : ""))); list_context (root_nc.in (), 1); } + orb->destroy (); } catch (const CORBA::Exception& ex) { @@ -726,6 +727,5 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) return -1; } - orb->destroy (); return 0; } |