Changeset 0312c5 in git


Ignore:
Timestamp:
Jul 4, 2011, 6:09:46 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
fc15cc799d1c7198bd1e43daa447a104f50c43c0
Parents:
89656143073a299ea34c74edd13feac5e3067893
Message:
fix memeory leaks (tr. 214)

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

Legend:

Unmodified
Added
Removed
  • kernel/gring.cc

    r896561 r0312c5  
    576576  /* now we have to destroy out! */
    577577  p_Delete(&out,r);
    578   out = NULL;
    579578
    580579  if (iG==jG)
     
    14881487  p_Test(p2,r);
    14891488  n_Delete(&C,r);
     1489  n_Delete(&cG,r);
    14901490
    14911491  poly out = nc_mm_Mult_pp(m, pNext(p1), r);
     
    17401740  }
    17411741
    1742   number C1  = n_Copy(p_GetCoeff(M1,r),r);      // C1 = lc(M1)
    1743   number C2  = n_Copy(p_GetCoeff(M2,r),r);      // C2 = lc(M2)
     1742  number C1  = p_GetCoeff(M1,r);      // C1 = lc(M1)
     1743  number C2  = p_GetCoeff(M2,r);      // C2 = lc(M2)
    17441744
    17451745  /* GCD stuff */
     
    17481748  if (!n_IsOne(C, r))                              // if C != 1
    17491749  {
    1750     C1=n_Div(C1, C, r);                              // C1 = C1 / C
    1751     C2=n_Div(C2, C, r);                              // C2 = C2 / C
     1750    C1=n_Div(C1, C, r);                            // C1 = C1 / C
     1751    C2=n_Div(C2, C, r);                            // C2 = C2 / C
     1752  }
     1753  else
     1754  {
     1755    C1=n_Copy(C1,r);
     1756    C2=n_Copy(C2,r);
    17521757  }
    17531758
     
    18241829
    18251830  M2=p_Add_q(M2,M1,r);                           // M2 = spoly(lt(p1), lt(p2)) + m1 * tail(p1), delete M1
     1831  M1=NULL;
    18261832#ifdef PDEBUG
    18271833  p_Test(M2,r);
     
    18521858
    18531859  M2 = p_Add_q(M2,M1,r);                           // M2 = spoly(lt(p1), lt(p2)) + m1 * tail(p1) + m2*tail(p2)
     1860  M1=NULL;
    18541861
    18551862#ifdef PDEBUG
Note: See TracChangeset for help on using the changeset viewer.