You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2005/08/27 10:02:37 UTC
cvs commit: ws-axis/c/src/engine/client Call.cpp
samisa 2005/08/27 01:02:37
Modified: c/src/engine/client Call.cpp
Log:
Fixed memory leaks AXISCPP-817
Revision Changes Path
1.123 +3 -12 ws-axis/c/src/engine/client/Call.cpp
Index: Call.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/client/Call.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- Call.cpp 26 Jul 2005 16:23:43 -0000 1.122
+++ Call.cpp 27 Aug 2005 08:02:37 -0000 1.123
@@ -83,10 +83,7 @@
}
catch( AxisException& e)
{
- char * pszError = new char[strlen( e.what()) + 1];
- strcpy( pszError, e.what());
-
- throw AxisGenException( e.getExceptionCode(), const_cast<char*>(pszError));
+ throw AxisGenException( e.getExceptionCode(), e.what());
}
catch(...)
{
@@ -353,19 +350,13 @@
}
catch( AxisException& e)
{
- char * pszError = new char[strlen( e.what()) + 1];
- strcpy( pszError, e.what());
-
- throw AxisGenException(e.getExceptionCode(), const_cast<char*>(pszError));
+ throw AxisGenException(e.getExceptionCode(), e.what());
}
}
if( iSuccess < 0)
{
- string sError = m_pTransport->getLastChannelError();
- char * pszError = new char[sError.length() + 1];
- strcpy( pszError, sError.c_str());
- throw AxisGenException( -iSuccess, const_cast<char*>(pszError));
+ throw AxisGenException( -iSuccess, m_pTransport->getLastChannelError());
}
return iSuccess;