comparison liboctave/MatrixType.cc @ 12564:61cd086e9aeb

Correct slight logical mistake in memleak patch (bug #32804)
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Fri, 01 Apr 2011 03:52:05 -0600
parents 681bb733f4f4
children 4804ad4ce0de
comparison
equal deleted inserted replaced
12563:681bb733f4f4 12564:61cd086e9aeb
920 upper_band = a.upper_band; 920 upper_band = a.upper_band;
921 lower_band = a.lower_band; 921 lower_band = a.lower_band;
922 dense = a.dense; 922 dense = a.dense;
923 full = a.full; 923 full = a.full;
924 924
925 if (nperm)
926 {
927 delete[] perm;
928 }
929
925 if (a.nperm != 0) 930 if (a.nperm != 0)
926 { 931 {
927 if (nperm)
928 {
929 delete[] perm;
930 }
931
932 perm = new octave_idx_type [a.nperm]; 932 perm = new octave_idx_type [a.nperm];
933 for (octave_idx_type i = 0; i < a.nperm; i++) 933 for (octave_idx_type i = 0; i < a.nperm; i++)
934 perm[i] = a.perm[i]; 934 perm[i] = a.perm[i];
935 } 935 }
936 936