Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Invalid
-
1.5 Alpha
-
None
-
None
-
Windows
Description
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);