summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2016-09-14 11:23:37 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2016-09-14 11:23:37 +0200
commit5f217dc03ff7bb574f281056b2d526b50863d65b (patch)
treed7b6a6d10f5f316daff295cb6700d22f68854452
parent851196b5e70421cd62c16e47ccd3863591ffa8c7 (diff)
downloadATCD-5f217dc03ff7bb574f281056b2d526b50863d65b.tar.gz
Fixed memory leaks reported by Coverity
* TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp: * TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp:
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp11
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp14
2 files changed, 14 insertions, 11 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
index 16a84eebf61..98c3f7bf520 100644
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
@@ -651,9 +651,14 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,
if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) TAO_StreamCtrl::create_B: succeeded\n"));
- if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG,
- "\n(%P|%t)stream_endpoint_b_ = %s",
- TAO_ORB_Core_instance ()->orb ()->object_to_string (this->sep_b_.in ())));
+ if (TAO_debug_level > 0)
+ {
+ CORBA::String_var ep = TAO_ORB_Core_instance ()->orb ()->object_to_string (this->sep_b_.in ());
+ ORBSVCS_DEBUG ((LM_DEBUG,
+ "\n(%P|%t)stream_endpoint_b_ = <%C>",
+ ep.in ()));
+ }
+
// Define ourselves as the related_streamctrl property of the sep.
CORBA::Any streamctrl_any;
streamctrl_any <<= this->streamctrl_.in ();
diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
index 4b09591dea5..882a2d742a3 100644
--- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
@@ -1,4 +1,3 @@
-
//=============================================================================
/**
* @file Endpoint_Strategy.cpp
@@ -7,7 +6,6 @@
*/
//=============================================================================
-
#include "orbsvcs/Log_Macros.h"
#include "orbsvcs/Log_Macros.h"
#include "orbsvcs/AV/Endpoint_Strategy.h"
@@ -17,8 +15,6 @@
#include "ace/Process_Semaphore.h"
-
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// ----------------------------------------------------------------------
@@ -33,7 +29,6 @@ TAO_AV_Endpoint_Strategy::TAO_AV_Endpoint_Strategy (void)
// Destructor.
TAO_AV_Endpoint_Strategy::~TAO_AV_Endpoint_Strategy (void)
{
-
}
// The base class defines the "failure" case, so that unless the
@@ -62,7 +57,6 @@ TAO_AV_Endpoint_Strategy::create_B (AVStreams::StreamEndPoint_B_ptr & /* stream_
-1);
}
-
// ----------------------------------------------------------------------
// TAO_AV_Endpoint_Process_Strategy
// ----------------------------------------------------------------------
@@ -339,8 +333,12 @@ TAO_AV_Endpoint_Process_Strategy_B::create_B (AVStreams::StreamEndPoint_B_ptr &s
"(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
-1);
- if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is:%s\n",
- TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in())));
+ if (TAO_debug_level > 0)
+ {
+ CORBA::String_var ep = TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in());
+ ORBSVCS_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is: <%C>\n",
+ ep.in ()));
+ }
stream_endpoint = AVStreams::StreamEndPoint_B::_duplicate ( this->stream_endpoint_b_.in() );
vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
}