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 "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org> on 2005/02/09 11:40:20 UTC
[jira] Created: (AXISCPP-415) Potential memory leaks in int AxisConfig::readConfFile () function
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
[jira] Closed: (AXISCPP-415) Potential memory leaks in int AxisConfig::readConfFile () function
Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
[ 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