changeset 852:6c6e34b09688

Fix minor resource leak (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 11:51:51 +0100
parents cf23656a8ca6
children 99f96cacde36
files layer/TimeValueLayer.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Wed Sep 03 11:49:31 2014 +0100
+++ b/layer/TimeValueLayer.cpp	Wed Sep 03 11:51:51 2014 +0100
@@ -1796,7 +1796,10 @@
                 (0, tr("Choose value calculation"),
                  text, options, prevSelection, &ok);
 
-            if (!ok) return false;
+            if (!ok) {
+                delete command;
+                return false;
+            }
             int selection = 0;
             generation = Labeller::ValueNone;