1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-22 20:53:44 +02:00

eeshow/diff.c: free list of highlighted areas

This commit is contained in:
Werner Almesberger 2016-08-09 10:24:08 -03:00
parent 71e79a20d0
commit 029cc30700

View File

@ -261,6 +261,18 @@ static void show_areas(struct diff *diff, uint32_t *a)
}
static void free_areas(struct diff *diff)
{
struct area *next;
while (diff->areas) {
next = diff->areas->next;
free(diff->areas);
diff->areas = next;
}
}
static void diff_end(void *ctx)
{
struct diff *diff = ctx;
@ -276,6 +288,7 @@ static void diff_end(void *ctx)
differences(diff, old_img, diff->new_img);
show_areas(diff, old_img);
free_areas(diff);
cro_img_write(diff->cr_ctx, diff->output_name);
}
@ -352,6 +365,8 @@ void diff_to_canvas(cairo_t *cr, int cx, int cy, float scale,
show_areas(&diff, img_old);
cairo_surface_mark_dirty(s);
free_areas(&diff);
cairo_set_source_surface(cr, s, 0, 0);
cairo_paint(cr);