Changeset 19574f in git


Ignore:
Timestamp:
Nov 17, 2021, 2:51:24 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
6fb433ea5b668bd9e77e49c4ed858a10152555c1
Parents:
017f019438ee60039731c0f96dc1faeb9a35ea95
Message:
fix: no NULL in n_Delete (ures vandermonde)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r017f01 r19574f  
    50695069  delete ures;
    50705070  delete arranger;
    5071   nDelete( &smv );
     5071  if (smv!=NULL) nDelete( &smv );
    50725072
    50735073  res->data= (void *)listofroots;
  • kernel/numeric/mpr_numeric.cc

    r017f01 r19574f  
    174174
    175175    for ( i= 1; i < cn; i++ ) {              // i=2; i <= cn
    176       nDelete( &xx );
     176      if (xx!=NULL) nDelete( &xx );
    177177      xx= nCopy(x[i]);
    178178      xx= nInpNeg(xx);               // xx= -x[i]
    179179
    180180      for ( j= (cn-i-1); j <= (cn-2); j++) { // j=(cn+1-i); j <= (cn-1)
    181         nDelete( &tmp1 );
     181        if (tmp1!=NULL) nDelete( &tmp1 );
    182182        tmp1= nMult( xx, c[j+1] );           // c[j]= c[j] + (xx * c[j+1])
    183183        newnum= nAdd( c[j], tmp1 );
     
    195195      xx= nCopy(x[i]);                     // xx= x[i]
    196196
    197       nDelete( &t );
    198       t= nInit( 1 );                         // t= b= 1
    199       nDelete( &b );
     197      if (t!=NULL) nDelete( &t );
     198      t= nInit( 1 );                        // t= b= 1
     199      if (b!=NULL) nDelete( &b );
    200200      b= nInit( 1 );
    201       nDelete( &s );                         // s= q[cn-1]
     201      if (s!=NULL) nDelete( &s );           // s= q[cn-1]
    202202      s= nCopy( q[cn-1] );
    203203
     
    285285  }
    286286
    287   for ( i=0; i <= tdg; i++ ) nDelete( coeffs + i );
     287  for ( i=0; i <= tdg; i++ )
     288    if (coeffs[i]!=NULL) nDelete( coeffs + i );
    288289  omFreeSize( (void *)coeffs, (tdg+1) * sizeof( number ) );
    289290
Note: See TracChangeset for help on using the changeset viewer.