Changeset 93e7e91 in git


Ignore:
Timestamp:
Mar 25, 2010, 11:09:52 AM (13 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
efa772b3587393300e3cca08fbc50cf501ba148a
Parents:
9f29bf99f5455597cc55d833ed57771d304ca795
Message:
memory leak in factorize

git-svn-id: file:///usr/local/Singular/svn/trunk@12671 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/clapsing.cc

    r9f29bf r93e7e91  
    723723
    724724ideal singclap_factorize ( poly f, intvec ** v , int with_exps)
     725/* destroys f, sets *v */
    725726{
    726727  pTest(f);
     
    773774      res->m[0]=pOne();
    774775      // (**v)[0]=1; is already done
    775       return res;
    776     }
    777     for(i=pVariables;i>0;i--)
    778     {
    779       e=pGetExp(f,i);
    780       if(e!=0)
    781       {
    782         n--;
    783         poly p=pOne();
    784         pSetExp(p,i,1);
    785         pSetm(p);
    786         res->m[n]=p;
    787         if (with_exps!=1) (**v)[n]=e;
    788       }
    789     }
     776    }
     777    else
     778    {
     779      for(i=pVariables;i>0;i--)
     780      {
     781        e=pGetExp(f,i);
     782        if(e!=0)
     783        {
     784          n--;
     785          poly p=pOne();
     786          pSetExp(p,i,1);
     787          pSetm(p);
     788          res->m[n]=p;
     789          if (with_exps!=1) (**v)[n]=e;
     790        }
     791      }
     792    }
     793    pDelete(&f);
    790794    return res;
    791795  }
     
    11161120    nDelete(&N);
    11171121  }
    1118   //if (f!=NULL) pDelete(&f);
     1122  if (f!=NULL) pDelete(&f);
    11191123  //PrintS("......S\n");
    11201124  return res;
Note: See TracChangeset for help on using the changeset viewer.