axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dushshantha Chandradasa (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Created: (AXISCPP-415) Potential memory leaks in int AxisConfig::readConfFile () function
Date Wed, 09 Feb 2005 10:40:20 GMT
Potential memory leaks in int  AxisConfig::readConfFile () function
-------------------------------------------------------------------

         Key: AXISCPP-415
         URL: http://issues.apache.org/jira/browse/AXISCPP-415
     Project: Axis-C++
        Type: Improvement
  Components: Basic Architecture  
    Versions: 1.5 Alpha    
 Environment: Windows
    Reporter: Dushshantha Chandradasa
    Priority: Minor


Assigning a new value to pcValue poiner without checking for NULL will lead to memory leaks...

while (AXIS_SUCCESS == fileConfig.fileGet (carrLine, CONFBUFFSIZE))
    {
	int linesize = strlen (carrLine);
	/*
	   Ignore lines starting with # and empty lines
	 */
	if (carrLine[0] == pcComment || carrLine[0] == '\0')
	    continue;
	
     /*Better to add following lines here

        if(pcValue)
        {
           delete pcValue;
           pcValue=NULL;
        }
    */

        pcValue = strpbrk (carrLine, pcSeparator);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message