summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
index 45bf3384dc4..c48a71faded 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
@@ -320,7 +320,9 @@ be_visitor_amh_operation_ss::generate_shared_prologue (be_decl *node,
intf->compute_full_name ("AMH_", "", buf);
ACE_CString amh_skel_name ("POA_");
amh_skel_name += buf;
- delete [] buf;
+ // buf was allocated by ACE_OS::strdup, so we need to use free instead
+ // of delete.
+ ACE_OS::free (buf);
buf = 0;
*os << "void" << be_nl
@@ -360,7 +362,9 @@ be_visitor_amh_operation_ss::generate_shared_section (be_decl *node,
intf->compute_full_name ("TAO_AMH_", "ResponseHandler", buf);
ACE_CString response_handler_implementation_name ("POA_");
response_handler_implementation_name += buf;
- delete [] buf;
+ // buf was allocated by ACE_OS::strdup, so we need to use free instead
+ // of delete.
+ ACE_OS::free (buf);
buf = 0;
*os << be_nl