Changeset 1857 in Sophya for trunk/SophyaPI/PIGcont/gp_alloc.c


Ignore:
Timestamp:
Jan 14, 2002, 2:42:24 PM (24 years ago)
Author:
perderos
Message:

1) correction de fuites de memoire
2) integration de glpc_set.* ds gp_contour (variables en commun)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIGcont/gp_alloc.c

    r1844 r1857  
    5555
    5656void contour_free(struct gnuplot_contours *ptr){
    57   char *c;
     57  //char *c;
    5858  struct coordinate *coords;
    5959  struct gnuplot_contours *old;
     
    6161 
    6262  cur = ptr;
     63  //printf("\n contour_free  %x \n",cur);
    6364  while(cur){
     65    /*printf(" contour_free  %x \n",cur);*/
    6466    old = cur;
    65     cur = cur->next;
    66     c=old->label;
    67     coords = old->coords;
    68     if(c){free(c); c=NULL;}
     67    cur = cur->next;   
     68    coords = old->coords;   
    6969    if(coords){free(coords) ; coords = NULL;}
    7070    free(old);   
    71   }
     71    old=NULL;
     72  }
     73 
    7274
    7375}
Note: See TracChangeset for help on using the changeset viewer.