diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-09-02 17:04:24 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-09-02 17:04:24 +0000 |
commit | 060805137ff4efcfae162072afdd0e72ee4689cf (patch) | |
tree | d9eb96c4934272b21b6df4d479babf00fe242513 /TAO/tests/POA | |
parent | e74efd5aa6e93e54b2c1899bede044a0c841f642 (diff) | |
download | ATCD-060805137ff4efcfae162072afdd0e72ee4689cf.tar.gz |
Tue Sep 2 17:06:37 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/POA/Persistent_ID/client.cpp:
Fixed valgrind reported memory leak
* tests/POA/TIE/server.cpp:
Fixed coverity errors
Diffstat (limited to 'TAO/tests/POA')
-rw-r--r-- | TAO/tests/POA/Persistent_ID/client.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/POA/TIE/server.cpp | 30 |
2 files changed, 23 insertions, 9 deletions
diff --git a/TAO/tests/POA/Persistent_ID/client.cpp b/TAO/tests/POA/Persistent_ID/client.cpp index eebc4436ff3..334c891307a 100644 --- a/TAO/tests/POA/Persistent_ID/client.cpp +++ b/TAO/tests/POA/Persistent_ID/client.cpp @@ -30,7 +30,7 @@ parse_args (int argc, ACE_TCHAR **argv) switch (c) { case 'k': - IOR = ACE_OS::strdup (get_opts.opt_arg ()); + IOR = get_opts.opt_arg (); break; case 'x': diff --git a/TAO/tests/POA/TIE/server.cpp b/TAO/tests/POA/TIE/server.cpp index 25f4ccc7e90..9a152af4997 100644 --- a/TAO/tests/POA/TIE/server.cpp +++ b/TAO/tests/POA/TIE/server.cpp @@ -202,26 +202,36 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) FILE *output_file_4 = ACE_OS::fopen (ACE_TEXT_ALWAYS_CHAR(ior_4), "w"); if (output_file_1) + { ACE_OS::fprintf (output_file_1, "%s", first_ior.in ()); + ACE_OS::fclose (output_file_1); + } + if (output_file_2) + { ACE_OS::fprintf (output_file_2, "%s", second_ior.in ()); + ACE_OS::fclose (output_file_2); + } + if (output_file_3) + { ACE_OS::fprintf (output_file_3, "%s", third_ior.in ()); + ACE_OS::fclose (output_file_3); + } + if (output_file_4) + { ACE_OS::fprintf (output_file_4, "%s", forth_ior.in ()); - - ACE_OS::fclose (output_file_1); - ACE_OS::fclose (output_file_2); - ACE_OS::fclose (output_file_3); - ACE_OS::fclose (output_file_4); + ACE_OS::fclose (output_file_4); + } // Stringyfy all the object references and print them out. CORBA::String_var fifth_ior = @@ -235,16 +245,20 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) FILE *output_file_6 = ACE_OS::fopen (ACE_TEXT_ALWAYS_CHAR(ior_6), "w"); if (output_file_5) + { ACE_OS::fprintf (output_file_5, "%s", fifth_ior.in ()); + ACE_OS::fclose (output_file_5); + } + if (output_file_6) + { ACE_OS::fprintf (output_file_6, "%s", sixth_ior.in ()); - - ACE_OS::fclose (output_file_5); - ACE_OS::fclose (output_file_6); + ACE_OS::fclose (output_file_6); + } poa_manager->activate (); |