# HG changeset patch # User Chris Cannam # Date 1409746112 -3600 # Node ID 9f526ddc6165abc4e132ee0d723797cb8613c11b # Parent 048173126e711b4a618e0a2f616f05996f08369f Fix memory leak (from coverity scan) diff -r 048173126e71 -r 9f526ddc6165 data/model/SparseModel.h --- a/data/model/SparseModel.h Wed Sep 03 13:06:13 2014 +0100 +++ b/data/model/SparseModel.h Wed Sep 03 13:08:32 2014 +0100 @@ -363,9 +363,9 @@ virtual Command *getRemoveRowCommand(int row) { - EditCommand *command = new EditCommand(this, tr("Delete Data Point")); PointListIterator i = getPointListIteratorForRow(row); if (i == m_points.end()) return 0; + EditCommand *command = new EditCommand(this, tr("Delete Data Point")); command->deletePoint(*i); return command->finish(); }