[Marble-devel] leak in GeoDataLineString

Thibaut GRIDEL tgridel at free.fr
Thu Jul 23 23:20:29 CEST 2009


Hi,

I have identified a leak in
GeoDataLineStringPrivate::toDateLineCorrected()

but am unable to understand the logic so far, so am just referring this
to you.

==21056== 321,036 (10,608 direct, 310,428 indirect) bytes in 663 blocks
are definitely lost in loss record 383 of 410
==21056==    at 0x4025A2E: operator new(unsigned int)
(vg_replace_malloc.c:224)
==21056==    by 0x5064656:
Marble::GeoDataLineStringPrivate::toDateLineCorrected(Marble::GeoDataLineString
const&, QVector<Marble::GeoDataLineString*>&) (in
/home/thibaut/sandbox/kdeedu/marble/build/local/lib/libmarblewidget.so.0.7.0)
==21056==    by 0x50647F5:
Marble::GeoDataLineString::toDateLineCorrected() const (in
/home/thibaut/sandbox/kdeedu/marble/build/local/lib/libmarblewidget.so.0.7.0)


L463 unfinishedLineString is assigned a newly created dateLineCorrected
created l428, but no other code uses it because assignment is in if
block L463->466 and potential use of unfinishedLineString happens in
that same test's else block L467->487

If code is working then keeping dateLineCorrected L463 is the leak, and
L478->481 can never happen.
Otherwise I cannot tell what happens but most likely either
unfinishedLineString or dateLineCorrected must be deleted somehow.

Best Regards,

Thibaut



More information about the Marble-devel mailing list