changeset 14083:8717cc808b20 stable

Stop memory leak in idx_vector_rep when constructor fails. * idx-vector.cc: Stop memory leak in idx_vector_rep when constructor fails.
author Rik <octave@nomad.inbox5.com>
date Wed, 21 Dec 2011 08:42:11 -0800
parents 97f41a44dd80
children 5aba9fa234cf
files liboctave/idx-vector.cc
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/idx-vector.cc	Wed Dec 21 10:24:11 2011 -0500
+++ b/liboctave/idx-vector.cc	Wed Dec 21 08:42:11 2011 -0800
@@ -331,7 +331,10 @@
       data = d;
 
       if (err)
+      {
+        delete [] data;
         gripe_invalid_index ();
+      }
     }
 }