Changeset e39ca0 in git


Ignore:
Timestamp:
Nov 28, 2016, 3:27:11 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
adb7b747e50418d86748b27ced0b13733493bee6
Parents:
c665c39ebd2c9d0fa178ec7004ad58d5c91333ec
Message:
fix: memory leak in minor(m,k,I)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/linear_algebra/MinorInterface.cc

    rc665c3 re39ca0  
    268268  /* copy all polynomials and reduce them w.r.t. iSB
    269269     (if iSB is present, i.e., not the NULL pointer) */
    270   for (int i = 0; i < length; i++)
    271   {
    272     nfPolyMatrix[i] = pCopy(myPolyMatrix[i]);
    273     if (iSB != 0) nfPolyMatrix[i] = kNF(iSB, currRing->qideal,
    274                                         nfPolyMatrix[i]);
     270  if (iSB != NULL)
     271  {
     272    for (int i = 0; i < length; i++)
     273    {
     274      nfPolyMatrix[i] = kNF(iSB, currRing->qideal,myPolyMatrix[i]);
     275    }
     276  }
     277  else
     278  {
     279    for (int i = 0; i < length; i++)
     280    {
     281      nfPolyMatrix[i] = pCopy(myPolyMatrix[i]);
     282    }
    275283  }
    276284
Note: See TracChangeset for help on using the changeset viewer.