Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15
-
6a90078d6bfe7900b6c9a6ea8c758172c7bc241f (qt/qtbase/dev) 31d7252d1c8d7fd7430903460e4093234f469e1a (qt/qtbase/5.15)
Description
AnchorVertex is subclassed by AnchorVertexPair, which adds non-POD data members, resulting in the compiler generating a default destructor.
AnchorVertexPair objects are allocated with operator new and upcast when placed into QList<AnchorVertex*>, for instance in calls to replaceVertex. Deletion of those instances is then done via qDeleteAll on the lists, or otherwise primarily by deleting AnchorVertex pointers. There is only a single case where a AnchorVertexPair* is deleted, and no case where the type of the instance is checked (via the m_type member) before deleting instances.
This makes it very likely that there are memory leaks, as deleting an AnchorVertexPair instance through a AnchorVertex* will not call the generated ~AnchorVertexPair destructor.
Coverity ID 218707
Attachments
Issue Links
- mentioned in
-
Page Loading...