Changeset 10a907 in git


Ignore:
Timestamp:
Mar 16, 1999, 2:38:08 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'b324714bf5073469800caef737deba1366fbd81f')
Children:
bc7e5b542d1eb33867373d8931a4db749c0780ab
Parents:
6734fbd784b119d06cfdd34a6fdb6027b1a41165
Message:
*hannes: fixed memory bug in highcorner


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r6734fb r10a907  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.136 1999-03-15 09:20:59 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.137 1999-03-16 13:38:08 Singular Exp $ */
    55
    66/*
     
    25162516  assumeStdFlag(v);
    25172517  intvec *w=(intvec*)atGet(v,"isHomog");
    2518   intvec *module_w=NULL;
     2518  BOOLEAN delete_w=FALSE;
    25192519  ideal I=(ideal)v->Data();
    25202520  int i;
    25212521  poly p=NULL,po=NULL;
    25222522  int rk=idRankFreeModule(I);
    2523   if (w!=NULL)
    2524     module_w=new intvec(*w);
    2525   else
    2526     module_w = new intvec(rk);
     2523  if (w==NULL)
     2524  {
     2525    w = new intvec(rk);
     2526    delete_w=TRUE;
     2527  }
    25272528  for(i=rk;i>0;i--)
    25282529  {
     
    25312532    {
    25322533      Werror("module must be zero-dimensional");
    2533       delete module_w;
     2534      if (delete_w) delete w;
    25342535      return TRUE;
    25352536    }
     
    25412542    {
    25422543      // now po!=NULL, p!=NULL
    2543       int d=(pFDeg(po)+(*module_w)[pGetComp(po)-1] - pFDeg(p)-(*module_w)[i-1]);
     2544      int d=(pFDeg(po)+(*w)[pGetComp(po)-1] - pFDeg(p)-(*w)[i-1]);
    25442545      if (d==0)
    25452546        d=pComp0(p,po);
     
    25542555    }
    25552556  }
    2556   delete module_w;
     2557  if (delete_w) delete w;
    25572558  res->data=(void *)po;
    25582559  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.