we dereference pProfile->m_Lines on the next line anyway

Change-Id: I8ab203baa6276cb950e5a6168af32cb4a9fa24d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166915
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-04-30 09:23:46 +01:00
parent d25b88ca2b
commit 82ba7e2f78

View file

@ -1353,9 +1353,9 @@ static const char* addLine(osl_TProfileImpl* pProfile, const char* Line)
}
if ( pProfile->m_Lines != nullptr && pProfile->m_Lines[pProfile->m_NoLines] != nullptr )
if (pProfile->m_Lines[pProfile->m_NoLines] != nullptr)
{
free(pProfile->m_Lines[pProfile->m_NoLines]);
free(pProfile->m_Lines[pProfile->m_NoLines]);
}
pProfile->m_Lines[pProfile->m_NoLines++] = strdup(Line);