Coverity says:

 82                for (int i = 0; i < m_extraGeometries.count(); i++) {
At conditional (1): "<new init>@dim2 < 5U" taking the true branch.
At conditional (2): "<new init>@dim2 < 5U" taking the true branch.
At conditional (3): "<new init>@dim2 < 5U" taking the false branch.
CID 709298: Resource leak (RESOURCE_LEAK)
Calling allocation function "operator new(unsigned int)".
Assigning: "item2" = storage returned from "new Mlt::GeometryItem({{, , , , , , 
, , {}}})".
 83                    Mlt::GeometryItem *item2 = new Mlt::GeometryItem();
At conditional (4): "this->m_extraGeometries.at(i)->next_key(item, mousePos) == 
0" taking the false branch.
 84                    if (m_extraGeometries.at(i)->next_key(item, mousePos) == 
0) {
 85                        item2->x(item.x());
 86                        item2->frame(item.frame());
 87                        m_extraMovingItems.append(item2);
 88                    }
Variable "item2" going out of scope leaks the storage it points to.
 89                }
---
 src/keyframehelper.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/keyframehelper.cpp b/src/keyframehelper.cpp
index 5a8de19..a1c9af9 100644
--- a/src/keyframehelper.cpp
+++ b/src/keyframehelper.cpp
@@ -85,6 +85,8 @@ void KeyframeHelper::mousePressEvent(QMouseEvent * event)
                         item2->x(item.x());
                         item2->frame(item.frame());
                         m_extraMovingItems.append(item2);
+                    } else {
+                        delete(item2);
                     }
                 }
                 
-- 
1.7.10.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Kdenlive-devel mailing list
Kdenlive-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel

Reply via email to