Kaydet (Commit) 4b1ab968 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#440167 Dereference after null check

Change-Id: I05bb7592600ab157d7a5e9dc6280168519d7b5bd
üst 61cb4a8e
......@@ -1501,17 +1501,15 @@ static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
pProfile->m_Lines[idx]=0;
}
}
if (pProfile->m_Lines == NULL)
{
pProfile->m_NoLines = 0;
pProfile->m_MaxLines = 0;
return (NULL);
}
}
if (pProfile->m_Lines == NULL)
{
pProfile->m_NoLines = 0;
pProfile->m_MaxLines = 0;
return (NULL);
}
if ( pProfile->m_Lines != 0 && pProfile->m_Lines[pProfile->m_NoLines] != 0 )
if ( pProfile->m_Lines[pProfile->m_NoLines] != 0 )
{
free(pProfile->m_Lines[pProfile->m_NoLines]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment