id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1103	Memory Leak in OGRStyleTool::GetStyleString	rlcave3rd@…	warmerdam	"{{{
I found this memory leak in GDAL 1.3.1.  Here is the patch I used (my changes
are marked with "">>"" in the left margin):

const char *OGRStyleTool::GetStyleString( OGRStyleParamId *pasStyleParam ,
                            OGRStyleValue *pasStyleValue, int nSize)
{
    int i;
    GBool bFound;

    char *pszCurrent = NULL;
    const char *pszClass;
    
    pszCurrent = (char *)CPLCalloc(nSize, 20 * sizeof(char));

<clipped for brevity>

        strcat(pszCurrent,"")"");

        m_pszStyleString = CPLStrdup(pszCurrent);

>>      CPLFree(pszCurrent); // Fixed memory leak

        m_bModified = FALSE;
    }
    
    return m_pszStyleString;
}
}}}"	defect	closed	high		OGR_SF	unspecified	normal	fixed		
