Branch: Tag:

2000-04-10

2000-04-10 21:58:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed memory leak?

Rev: src/modules/Image/encodings/xcf.c:1.14

1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.13 2000/02/08 03:39:19 per Exp $"); + RCSID("$Id: xcf.c,v 1.14 2000/04/10 21:58:23 grubba Exp $");      #include "image_machine.h"   
273:    struct tile *t;    while( (t = l->first_tile) )    { -  struct tile *n; -  n = t->next; +  l->first_tile = t->next;    free(t); -  l->first_tile = n; +     }   }   
286:       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    free_level( &l->image_data.level );   }
301:       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    if(l->mask)    {
320:       while( (p = l->first_property) )    { -  struct property *n; -  n = p->next; +  l->first_property = p->next;    free(p); -  l->first_property = n; +     }    free_level( &l->image_data.level );   }
333:   {    struct property *p;    struct layer *l; +  struct channel *c;    while( (p = i->first_property) )    { -  struct property *n; -  n = p->next; +  i->first_property = p->next;    free(p); -  i->first_property = n; +     }    while( (l = i->first_layer) )    { -  struct layer *n; -  n = l->next; +  i->first_layer = l->next;    free_layer( l );    free( l ); -  i->first_layer = n; +     } -  +  while( (c = i->first_channel) ) +  { +  i->first_channel = c->next; +  free_channel(c); +  free(c);    } -  + }      static struct level read_level( struct buffer *buff,    struct buffer *initial )