Hello,
In the file filters/binfilter/bf_svtools/source/items/svt_aeitem.cxx
We've got this :
SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
SfxEnumItem(rCopy),
pValues(0),
pDisabledValues( 0 )
{
DBG_CTOR(SfxAllEnumItem, 0);
if ( !rCopy.pValues )
return;
pValues = new SfxAllEnumValueArr;
for ( USHORT nPos = 0; nPos < rCopy.pValues->Count(); ++nPos )
{
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
pVal->nValue = rCopy.pValues->GetObject(nPos)->nValue;
pVal->aText = rCopy.pValues->GetObject(nPos)->aText;
const SfxAllEnumValue_Impl *pTemp = pVal;
pValues->Insert( pTemp, nPos );
}
...
And cppcheck says :
Checking ./filters/binfilter/bf_svtools/source/items/svt_aeitem.cxx...
[./filters/binfilter/bf_svtools/source/items/svt_aeitem.cxx:110]:
(error) Memory leak: pVal
In my opinion it's a false positive since pVal mustn't be destroyed
since it's indirectly used via pTemp in pValues.
Am i right or wrong ?
Julien.
(i just updated cppcheck with git and recompiled it)
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice