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 2004/12/22 09:28:34 UTC
cvs commit: ws-axis/c/src/engine/client ClientAxisEngine.cpp Call.cpp
samisa 2004/12/22 00:28:34
Modified: c/src/engine/client ClientAxisEngine.cpp Call.cpp
Log:
Fixed trivial memory leak due to use of delete in place of delete[].
Revision Changes Path
1.23 +2 -2 ws-axis/c/src/engine/client/ClientAxisEngine.cpp
Index: ClientAxisEngine.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/client/ClientAxisEngine.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ClientAxisEngine.cpp 30 Nov 2004 13:55:18 -0000 1.22
+++ ClientAxisEngine.cpp 22 Dec 2004 08:28:34 -0000 1.23
@@ -73,7 +73,7 @@
else
{
char * pchTempService = new char [strlen(pchService)+1];
- // Skip the starting double quote
+ // Skip the starting double quote
strcpy(pchTempService, pchService+1);
/* The String returned as the service name has the format "Calculator#add".
@@ -82,7 +82,7 @@
/* get service description object from the WSDD Deployment object */
pService = g_pWSDDDeployment->getService (pchTempService);
- delete pchTempService;
+ delete [] pchTempService; // Samisa: should delete the whole array
}
//Get Global and Transport Handlers
1.81 +1 -1 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.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- Call.cpp 22 Dec 2004 08:17:03 -0000 1.80
+++ Call.cpp 22 Dec 2004 08:28:34 -0000 1.81
@@ -253,7 +253,7 @@
delete [] m_pchSessionID;
m_pchSessionID = NULL;
}
- m_pchSessionID = new char[len + 1]; // Samisa: should have space for terminating car
+ m_pchSessionID = new char[len + 1]; // Samisa: should have space for terminating char
strcpy(m_pchSessionID, pachTemp);
}
else //Samisa: there is no session key