From f930f6037e4ba65b3a7e1d7ea6d226b6c5ba3771 Mon Sep 17 00:00:00 2001 From: Calvin Storoschuk Date: Mon, 25 Jul 2022 22:02:24 -0400 Subject: [PATCH] destroy saved path after use --- src/CanvasRenderingContext2d.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index 17faf51da..2bd0533f5 100644 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -409,6 +409,7 @@ Context2d::fill(bool preserve) { cairo_rectangle(_context, 0, 0, width, height); cairo_clip(_context); cairo_append_path(_context, savedPath); + cairo_path_destroy(savedPath); cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_REPEAT); needsRestore = true; }