]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a memory leak in pgtk_draw_fringe_bitmap
authorSharaf Zaman <shzam@sdf.org>
Sat, 23 Oct 2021 14:01:55 +0000 (14:01 +0000)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 24 Oct 2021 18:06:14 +0000 (20:06 +0200)
* src/pgtkterm.c (pgtk_draw_fringe_bitmap): we had an unbalanced
cairo_save/restore.

Copyright-paperwork-exempt: yes

src/pgtkterm.c

index 86074d010d63c968e5bf3db1916b27a7953f5fbb..40489c0c6b170669f962ae2e010ed37dfdf58258 100644 (file)
@@ -3504,7 +3504,6 @@ pgtk_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
   struct face *face = p->face;
 
   cairo_t *cr = pgtk_begin_cr_clip (f);
-  cairo_save (cr);
 
   /* Must clip because of partially visible lines.  */
   pgtk_clip_to_row (w, row, ANY_AREA, cr);
@@ -3546,7 +3545,7 @@ pgtk_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
                          p->wd, p->h, p->x, p->y, p->overlay_p);
     }
 
-  cairo_restore (cr);
+  pgtk_end_cr_clip(f);
 }
 
 static struct atimer *hourglass_atimer = NULL;