You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2005/02/09 12:02:12 UTC

[jira] Closed: (AXISCPP-415) Potential memory leaks in int AxisConfig::readConfFile () function

     [ 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