Author: amassari
Date: Thu Aug 10 04:48:43 2006
New Revision: 430359

URL: http://svn.apache.org/viewvc?rev=430359&view=rev
Log:
Fix memory leak (jira# 1624)

Modified:
    
xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp

Modified: 
xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp?rev=430359&r1=430358&r2=430359&view=diff
==============================================================================
--- 
xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp
 (original)
+++ 
xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/Tandem/TandemPlatformUtils.cpp
 Thu Aug 10 04:48:43 2006
@@ -184,9 +184,10 @@
     //  in native format, and goes out as Unicode always
     //
     char* newSrc = XMLString::transcode(srcPath, fgMemoryManager);
+    ArrayJanitor<char> newSrcJanitor(newSrc, fgMemoryManager);
 
     // Use a local buffer that is big enough for the largest legal path
-     char* tmpPath = dirname((char*)newSrc);
+    char* tmpPath = dirname((char*)newSrc);
     if (!tmpPath)
     {
         throw XMLPlatformUtilsException("XMLPlatformUtils::resetFile - Could 
not get the base path name");
@@ -198,7 +199,7 @@
     );//new char [strlen(tmpPath) +1];
     ArrayJanitor<char> newJanitor(newXMLString, fgMemoryManager);
     strcpy(newXMLString, tmpPath);
-        strcat(newXMLString , "/");
+    strcat(newXMLString , "/");
     // Return a copy of the path, in Unicode format
     return XMLString::transcode(newXMLString, manager);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to