summaryrefslogtreecommitdiff
path: root/gfx/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/diff.c')
-rw-r--r--gfx/diff.c5
1 files changed, 5 insertions, 0 deletions
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;
}