ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdinap...@apache.org
Subject cvs commit: ws-axis/c/src/xml/xerces XercesHandler.cpp
Date Tue, 14 Jun 2005 07:48:48 GMT
cdinapala    2005/06/14 00:48:48

  Modified:    c/src/xml/xerces XercesHandler.cpp
  Log:
  Removed “malloc” code from XercesHandler.cpp to solve Issue AXISCPP-640.
  
  Revision  Changes    Path
  1.13      +10 -3     ws-axis/c/src/xml/xerces/XercesHandler.cpp
  
  Index: XercesHandler.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/XercesHandler.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XercesHandler.cpp	18 May 2005 02:08:50 -0000	1.12
  +++ XercesHandler.cpp	14 Jun 2005 07:48:48 -0000	1.13
  @@ -113,13 +113,20 @@
       if (cp_PreviousNameOrValue)
       {
           char* cp_CurrentNameOrValue = XMLString::transcode(chars);
  -        char* cp_FullNameOrValue  = (char*) malloc(strlen(cp_PreviousNameOrValue) + strlen(cp_CurrentNameOrValue)
+ 1);
  +        //char* cp_FullNameOrValue  = (char*) malloc(strlen(cp_PreviousNameOrValue) + strlen(cp_CurrentNameOrValue)
+ 1);
  +		//Chinthana:Removed malloc
  +		char* cp_FullNameOrValue  = new char[strlen(cp_PreviousNameOrValue) + strlen(cp_CurrentNameOrValue)
+ 1];
           cp_FullNameOrValue[0] = '\0'; 
           strcat(cp_FullNameOrValue, cp_PreviousNameOrValue);
           strcat(cp_FullNameOrValue, cp_CurrentNameOrValue);
           m_pNextElement->m_pchNameOrValue = (const char*)cp_FullNameOrValue;
  -        free(const_cast <char*> (cp_PreviousNameOrValue));
  -        free(cp_CurrentNameOrValue);
  +        //free(const_cast <char*> (cp_PreviousNameOrValue));
  +        //free(cp_CurrentNameOrValue);
  +		//Chinthana:Removed free
  +		delete (const_cast <char*> (cp_PreviousNameOrValue));
  +		delete cp_CurrentNameOrValue;
  +		//14/06/2005.............................................................
  +
       }
       else
           m_pNextElement->m_pchNameOrValue = XMLString::transcode(chars);
  
  
  

Mime
View raw message