axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Closed: (AXISCPP-415) Potential memory leaks in int AxisConfig::readConfFile () function
Date Wed, 09 Feb 2005 11:02:12 GMT
     [ http://issues.apache.org/jira/browse/AXISCPP-415?page=history ]
     
Samisa Abeysinghe closed AXISCPP-415:
-------------------------------------

    Resolution: Invalid

There are no possible leaks here looking at the way the pointer is used here

> 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