summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--gfx/diff.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index abdbc3b..cb975bc 100644
--- a/Makefile
+++ b/Makefile
@@ -158,5 +158,7 @@ leak: $(NAME)
valgrind --leak-check=full --show-leak-kinds=all \
--num-callers=50 \
$(SUPP:%=--suppressions=%.supp) \
- eeshow -N 1 $(NEO900_HW)/neo900.pro -- pdf >/dev/null
+ eeshow $(NEO900_HW)/neo900.pro -- \
+ diff $(NEO900_HW)/neo900.pro >/dev/null
+# eeshow -N 1 $(NEO900_HW)/neo900.pro -- pdf >/dev/null
# eeshow -N 1 $(NEO900_HW)/neo900.pro -- png >/dev/null
diff --git a/gfx/diff.c b/gfx/diff.c
index 68c3ef9..9eb53e6 100644
--- a/gfx/diff.c
+++ b/gfx/diff.c
@@ -218,6 +218,9 @@ static bool diff_args(void *ctx, int argc, char *const *argv)
sch_render(new_sch.sheets, diff->gfx);
diff->new_gfx = diff->gfx;
+ sch_free(&new_sch);
+ lib_free(&new_lib);
+
diff->gfx = gfx_init(&cro_img_ops);
if (!gfx_args(diff->gfx, argc, argv))
goto fail_open;
@@ -457,6 +460,8 @@ static int diff_end(void *ctx)
cairo_surface_destroy(s);
cairo_destroy(old_cr);
+ gfx_end(diff->new_gfx);
+
return changed;
}